home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / FLTK-1.0.6 / configure < prev    next >
Encoding:
Text File  |  1999-09-27  |  91.8 KB  |  3,121 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.13 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --enable-debug          turn on debugging [default=no]"
  16. ac_help="$ac_help
  17.   --enable-shared         turn on shared libraries [default=no]"
  18. ac_help="$ac_help
  19.   --with-x                use the X Window System"
  20.  
  21. # Initialize some variables set by options.
  22. # The variables have the same names as the options, with
  23. # dashes changed to underlines.
  24. build=NONE
  25. cache_file=./config.cache
  26. exec_prefix=NONE
  27. host=NONE
  28. no_create=
  29. nonopt=NONE
  30. no_recursion=
  31. prefix=NONE
  32. program_prefix=NONE
  33. program_suffix=NONE
  34. program_transform_name=s,x,x,
  35. silent=
  36. site=
  37. srcdir=
  38. target=NONE
  39. verbose=
  40. x_includes=NONE
  41. x_libraries=NONE
  42. bindir='${exec_prefix}/bin'
  43. sbindir='${exec_prefix}/sbin'
  44. libexecdir='${exec_prefix}/libexec'
  45. datadir='${prefix}/share'
  46. sysconfdir='${prefix}/etc'
  47. sharedstatedir='${prefix}/com'
  48. localstatedir='${prefix}/var'
  49. libdir='${exec_prefix}/lib'
  50. includedir='${prefix}/include'
  51. oldincludedir='/usr/include'
  52. infodir='${prefix}/info'
  53. mandir='${prefix}/man'
  54.  
  55. # Initialize some other variables.
  56. subdirs=
  57. MFLAGS= MAKEFLAGS=
  58. SHELL=${CONFIG_SHELL-/bin/sh}
  59. # Maximum number of lines to put in a shell here document.
  60. ac_max_here_lines=12
  61.  
  62. ac_prev=
  63. for ac_option
  64. do
  65.  
  66.   # If the previous option needs an argument, assign it.
  67.   if test -n "$ac_prev"; then
  68.     eval "$ac_prev=\$ac_option"
  69.     ac_prev=
  70.     continue
  71.   fi
  72.  
  73.   case "$ac_option" in
  74.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  75.   *) ac_optarg= ;;
  76.   esac
  77.  
  78.   # Accept the important Cygnus configure options, so we can diagnose typos.
  79.  
  80.   case "$ac_option" in
  81.  
  82.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  83.     ac_prev=bindir ;;
  84.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  85.     bindir="$ac_optarg" ;;
  86.  
  87.   -build | --build | --buil | --bui | --bu)
  88.     ac_prev=build ;;
  89.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  90.     build="$ac_optarg" ;;
  91.  
  92.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  93.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  94.     ac_prev=cache_file ;;
  95.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  96.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  97.     cache_file="$ac_optarg" ;;
  98.  
  99.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  100.     ac_prev=datadir ;;
  101.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  102.   | --da=*)
  103.     datadir="$ac_optarg" ;;
  104.  
  105.   -disable-* | --disable-*)
  106.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  107.     # Reject names that are not valid shell variable names.
  108.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  109.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  110.     fi
  111.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  112.     eval "enable_${ac_feature}=no" ;;
  113.  
  114.   -enable-* | --enable-*)
  115.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  116.     # Reject names that are not valid shell variable names.
  117.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  118.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  119.     fi
  120.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  121.     case "$ac_option" in
  122.       *=*) ;;
  123.       *) ac_optarg=yes ;;
  124.     esac
  125.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  126.  
  127.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  128.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  129.   | --exec | --exe | --ex)
  130.     ac_prev=exec_prefix ;;
  131.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  132.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  133.   | --exec=* | --exe=* | --ex=*)
  134.     exec_prefix="$ac_optarg" ;;
  135.  
  136.   -gas | --gas | --ga | --g)
  137.     # Obsolete; use --with-gas.
  138.     with_gas=yes ;;
  139.  
  140.   -help | --help | --hel | --he)
  141.     # Omit some internal or obsolete options to make the list less imposing.
  142.     # This message is too long to be a string in the A/UX 3.1 sh.
  143.     cat << EOF
  144. Usage: configure [options] [host]
  145. Options: [defaults in brackets after descriptions]
  146. Configuration:
  147.   --cache-file=FILE       cache test results in FILE
  148.   --help                  print this message
  149.   --no-create             do not create output files
  150.   --quiet, --silent       do not print \`checking...' messages
  151.   --version               print the version of autoconf that created configure
  152. Directory and file names:
  153.   --prefix=PREFIX         install architecture-independent files in PREFIX
  154.                           [$ac_default_prefix]
  155.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  156.                           [same as prefix]
  157.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  158.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  159.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  160.   --datadir=DIR           read-only architecture-independent data in DIR
  161.                           [PREFIX/share]
  162.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  163.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  164.                           [PREFIX/com]
  165.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  166.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  167.   --includedir=DIR        C header files in DIR [PREFIX/include]
  168.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  169.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  170.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  171.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  172.   --program-prefix=PREFIX prepend PREFIX to installed program names
  173.   --program-suffix=SUFFIX append SUFFIX to installed program names
  174.   --program-transform-name=PROGRAM
  175.                           run sed PROGRAM on installed program names
  176. EOF
  177.     cat << EOF
  178. Host type:
  179.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  180.   --host=HOST             configure for HOST [guessed]
  181.   --target=TARGET         configure for TARGET [TARGET=HOST]
  182. Features and packages:
  183.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  184.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  185.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  186.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  187.   --x-includes=DIR        X include files are in DIR
  188.   --x-libraries=DIR       X library files are in DIR
  189. EOF
  190.     if test -n "$ac_help"; then
  191.       echo "--enable and --with options recognized:$ac_help"
  192.     fi
  193.     exit 0 ;;
  194.  
  195.   -host | --host | --hos | --ho)
  196.     ac_prev=host ;;
  197.   -host=* | --host=* | --hos=* | --ho=*)
  198.     host="$ac_optarg" ;;
  199.  
  200.   -includedir | --includedir | --includedi | --included | --include \
  201.   | --includ | --inclu | --incl | --inc)
  202.     ac_prev=includedir ;;
  203.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  204.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  205.     includedir="$ac_optarg" ;;
  206.  
  207.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  208.     ac_prev=infodir ;;
  209.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  210.     infodir="$ac_optarg" ;;
  211.  
  212.   -libdir | --libdir | --libdi | --libd)
  213.     ac_prev=libdir ;;
  214.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  215.     libdir="$ac_optarg" ;;
  216.  
  217.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  218.   | --libexe | --libex | --libe)
  219.     ac_prev=libexecdir ;;
  220.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  221.   | --libexe=* | --libex=* | --libe=*)
  222.     libexecdir="$ac_optarg" ;;
  223.  
  224.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  225.   | --localstate | --localstat | --localsta | --localst \
  226.   | --locals | --local | --loca | --loc | --lo)
  227.     ac_prev=localstatedir ;;
  228.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  229.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  230.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  231.     localstatedir="$ac_optarg" ;;
  232.  
  233.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  234.     ac_prev=mandir ;;
  235.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  236.     mandir="$ac_optarg" ;;
  237.  
  238.   -nfp | --nfp | --nf)
  239.     # Obsolete; use --without-fp.
  240.     with_fp=no ;;
  241.  
  242.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  243.   | --no-cr | --no-c)
  244.     no_create=yes ;;
  245.  
  246.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  247.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  248.     no_recursion=yes ;;
  249.  
  250.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  251.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  252.   | --oldin | --oldi | --old | --ol | --o)
  253.     ac_prev=oldincludedir ;;
  254.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  255.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  256.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  257.     oldincludedir="$ac_optarg" ;;
  258.  
  259.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  260.     ac_prev=prefix ;;
  261.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  262.     prefix="$ac_optarg" ;;
  263.  
  264.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  265.   | --program-pre | --program-pr | --program-p)
  266.     ac_prev=program_prefix ;;
  267.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  268.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  269.     program_prefix="$ac_optarg" ;;
  270.  
  271.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  272.   | --program-suf | --program-su | --program-s)
  273.     ac_prev=program_suffix ;;
  274.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  275.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  276.     program_suffix="$ac_optarg" ;;
  277.  
  278.   -program-transform-name | --program-transform-name \
  279.   | --program-transform-nam | --program-transform-na \
  280.   | --program-transform-n | --program-transform- \
  281.   | --program-transform | --program-transfor \
  282.   | --program-transfo | --program-transf \
  283.   | --program-trans | --program-tran \
  284.   | --progr-tra | --program-tr | --program-t)
  285.     ac_prev=program_transform_name ;;
  286.   -program-transform-name=* | --program-transform-name=* \
  287.   | --program-transform-nam=* | --program-transform-na=* \
  288.   | --program-transform-n=* | --program-transform-=* \
  289.   | --program-transform=* | --program-transfor=* \
  290.   | --program-transfo=* | --program-transf=* \
  291.   | --program-trans=* | --program-tran=* \
  292.   | --progr-tra=* | --program-tr=* | --program-t=*)
  293.     program_transform_name="$ac_optarg" ;;
  294.  
  295.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  296.   | -silent | --silent | --silen | --sile | --sil)
  297.     silent=yes ;;
  298.  
  299.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  300.     ac_prev=sbindir ;;
  301.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  302.   | --sbi=* | --sb=*)
  303.     sbindir="$ac_optarg" ;;
  304.  
  305.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  306.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  307.   | --sharedst | --shareds | --shared | --share | --shar \
  308.   | --sha | --sh)
  309.     ac_prev=sharedstatedir ;;
  310.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  311.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  312.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  313.   | --sha=* | --sh=*)
  314.     sharedstatedir="$ac_optarg" ;;
  315.  
  316.   -site | --site | --sit)
  317.     ac_prev=site ;;
  318.   -site=* | --site=* | --sit=*)
  319.     site="$ac_optarg" ;;
  320.  
  321.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  322.     ac_prev=srcdir ;;
  323.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  324.     srcdir="$ac_optarg" ;;
  325.  
  326.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  327.   | --syscon | --sysco | --sysc | --sys | --sy)
  328.     ac_prev=sysconfdir ;;
  329.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  330.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  331.     sysconfdir="$ac_optarg" ;;
  332.  
  333.   -target | --target | --targe | --targ | --tar | --ta | --t)
  334.     ac_prev=target ;;
  335.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  336.     target="$ac_optarg" ;;
  337.  
  338.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  339.     verbose=yes ;;
  340.  
  341.   -version | --version | --versio | --versi | --vers)
  342.     echo "configure generated by autoconf version 2.13"
  343.     exit 0 ;;
  344.  
  345.   -with-* | --with-*)
  346.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  347.     # Reject names that are not valid shell variable names.
  348.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  349.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  350.     fi
  351.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  352.     case "$ac_option" in
  353.       *=*) ;;
  354.       *) ac_optarg=yes ;;
  355.     esac
  356.     eval "with_${ac_package}='$ac_optarg'" ;;
  357.  
  358.   -without-* | --without-*)
  359.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  360.     # Reject names that are not valid shell variable names.
  361.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  362.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  363.     fi
  364.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  365.     eval "with_${ac_package}=no" ;;
  366.  
  367.   --x)
  368.     # Obsolete; use --with-x.
  369.     with_x=yes ;;
  370.  
  371.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  372.   | --x-incl | --x-inc | --x-in | --x-i)
  373.     ac_prev=x_includes ;;
  374.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  375.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  376.     x_includes="$ac_optarg" ;;
  377.  
  378.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  379.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  380.     ac_prev=x_libraries ;;
  381.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  382.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  383.     x_libraries="$ac_optarg" ;;
  384.  
  385.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  386.     ;;
  387.  
  388.   *)
  389.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  390.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  391.     fi
  392.     if test "x$nonopt" != xNONE; then
  393.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  394.     fi
  395.     nonopt="$ac_option"
  396.     ;;
  397.  
  398.   esac
  399. done
  400.  
  401. if test -n "$ac_prev"; then
  402.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  403. fi
  404.  
  405. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  406.  
  407. # File descriptor usage:
  408. # 0 standard input
  409. # 1 file creation
  410. # 2 errors and warnings
  411. # 3 some systems may open it to /dev/tty
  412. # 4 used on the Kubota Titan
  413. # 6 checking for... messages and results
  414. # 5 compiler messages saved in config.log
  415. if test "$silent" = yes; then
  416.   exec 6>/dev/null
  417. else
  418.   exec 6>&1
  419. fi
  420. exec 5>./config.log
  421.  
  422. echo "\
  423. This file contains any messages produced by compilers while
  424. running configure, to aid debugging if configure makes a mistake.
  425. " 1>&5
  426.  
  427. # Strip out --no-create and --no-recursion so they do not pile up.
  428. # Also quote any args containing shell metacharacters.
  429. ac_configure_args=
  430. for ac_arg
  431. do
  432.   case "$ac_arg" in
  433.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  434.   | --no-cr | --no-c) ;;
  435.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  436.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  437.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  438.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  439.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  440.   esac
  441. done
  442.  
  443. # NLS nuisances.
  444. # Only set these to C if already set.  These must not be set unconditionally
  445. # because not all systems understand e.g. LANG=C (notably SCO).
  446. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  447. # Non-C LC_CTYPE values break the ctype check.
  448. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  449. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  450. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  451. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  452.  
  453. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  454. rm -rf conftest* confdefs.h
  455. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  456. echo > confdefs.h
  457.  
  458. # A filename unique to this package, relative to the directory that
  459. # configure is in, which we can look for to find out if srcdir is correct.
  460. ac_unique_file=src/Fl.cxx
  461.  
  462. # Find the source files, if location was not specified.
  463. if test -z "$srcdir"; then
  464.   ac_srcdir_defaulted=yes
  465.   # Try the directory containing this script, then its parent.
  466.   ac_prog=$0
  467.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  468.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  469.   srcdir=$ac_confdir
  470.   if test ! -r $srcdir/$ac_unique_file; then
  471.     srcdir=..
  472.   fi
  473. else
  474.   ac_srcdir_defaulted=no
  475. fi
  476. if test ! -r $srcdir/$ac_unique_file; then
  477.   if test "$ac_srcdir_defaulted" = yes; then
  478.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  479.   else
  480.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  481.   fi
  482. fi
  483. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  484.  
  485. # Prefer explicitly selected file to automatically selected ones.
  486. if test -z "$CONFIG_SITE"; then
  487.   if test "x$prefix" != xNONE; then
  488.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  489.   else
  490.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  491.   fi
  492. fi
  493. for ac_site_file in $CONFIG_SITE; do
  494.   if test -r "$ac_site_file"; then
  495.     echo "loading site script $ac_site_file"
  496.     . "$ac_site_file"
  497.   fi
  498. done
  499.  
  500. if test -r "$cache_file"; then
  501.   echo "loading cache $cache_file"
  502.   . $cache_file
  503. else
  504.   echo "creating cache $cache_file"
  505.   > $cache_file
  506. fi
  507.  
  508. ac_ext=c
  509. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  510. ac_cpp='$CPP $CPPFLAGS'
  511. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  512. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  513. cross_compiling=$ac_cv_prog_cc_cross
  514.  
  515. ac_exeext=
  516. ac_objext=o
  517. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  518.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  519.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  520.     ac_n= ac_c='
  521. ' ac_t='    '
  522.   else
  523.     ac_n=-n ac_c= ac_t=
  524.   fi
  525. else
  526.   ac_n= ac_c='\c' ac_t=
  527. fi
  528.  
  529.  
  530.  
  531. # Extract the first word of "ranlib", so it can be a program name with args.
  532. set dummy ranlib; ac_word=$2
  533. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  534. echo "configure:535: checking for $ac_word" >&5
  535. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  536.   echo $ac_n "(cached) $ac_c" 1>&6
  537. else
  538.   if test -n "$RANLIB"; then
  539.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  540. else
  541.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  542.   ac_dummy="$PATH"
  543.   for ac_dir in $ac_dummy; do
  544.     test -z "$ac_dir" && ac_dir=.
  545.     if test -f $ac_dir/$ac_word; then
  546.       ac_cv_prog_RANLIB="ranlib"
  547.       break
  548.     fi
  549.   done
  550.   IFS="$ac_save_ifs"
  551.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  552. fi
  553. fi
  554. RANLIB="$ac_cv_prog_RANLIB"
  555. if test -n "$RANLIB"; then
  556.   echo "$ac_t""$RANLIB" 1>&6
  557. else
  558.   echo "$ac_t""no" 1>&6
  559. fi
  560.  
  561.  
  562. LIBNAME="libfltk.a"
  563. if test "$RANLIB" != ":"; then
  564.   LIBCOMMAND="ar cr"
  565. else
  566.   LIBCOMMAND="ar crs"
  567. fi
  568. DSOCOMMAND="echo"
  569. DSONAME=""
  570.  
  571.  
  572. uname=`uname`
  573. uversion=`uname -r | sed -e '1,$s/[-.A-Za-z]//g'`
  574. if test "$uname" = "IRIX64"; then
  575.     uname="IRIX"
  576. fi
  577.  
  578.  
  579. DEBUGFLAG=""
  580. PICFLAG=0
  581. CFLAGS="${CFLAGS:=}"
  582. CXXFLAGS="${CXXFLAGS:=}"
  583.  
  584. # Check whether --enable-debug or --disable-debug was given.
  585. if test "${enable_debug+set}" = set; then
  586.   enableval="$enable_debug"
  587.   if eval "test x$enable_debug = xyes"; then
  588.   DEBUGFLAG="-g "
  589. fi
  590. fi
  591.  
  592. # Check whether --enable-shared or --disable-shared was given.
  593. if test "${enable_shared+set}" = set; then
  594.   enableval="$enable_shared"
  595.   
  596. if eval "test x$enable_shared = xyes"; then
  597.   PICFLAG=1
  598.   case $uname in
  599.       SunOS* | UNIX_S*)
  600.           DSONAME="libfltk.so.1"
  601.       DSOCOMMAND="\$(CXX) -Wl,-h,libfltk.so.1 \$(LDLIBS) -G $DEBUGFLAG -o"
  602.       ;;
  603.       HP-UX*)
  604.           DSONAME="libfltk.sl.1"
  605.       DSOCOMMAND="ld -b -z +h libfltk.sl.1 $DEBUGFLAG -o"
  606.       ;;
  607.       OSF1*)
  608.           DSONAME="libfltk.so.1"
  609.           DSOCOMMAND="\$(CXX) -Wl,-soname,libfltk.so.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
  610.       ;;
  611.       IRIX*)
  612.           DSONAME="libfltk.so.1"
  613.           DSOCOMMAND="\$(CXX) -soname libfltk.so.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
  614.       ;;
  615.       *)
  616.           echo "Warning: shared libraries may not be supported.  Trying -shared"
  617.       echo "         option with compiler."
  618.           DSONAME="libfltk.so.1"
  619.           DSOCOMMAND="\$(CXX) -Wl,-soname,libfltk.so.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
  620.       ;;
  621.   esac
  622. fi
  623. fi
  624.  
  625.  
  626. # Extract the first word of "gcc", so it can be a program name with args.
  627. set dummy gcc; ac_word=$2
  628. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  629. echo "configure:630: checking for $ac_word" >&5
  630. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  631.   echo $ac_n "(cached) $ac_c" 1>&6
  632. else
  633.   if test -n "$CC"; then
  634.   ac_cv_prog_CC="$CC" # Let the user override the test.
  635. else
  636.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  637.   ac_dummy="$PATH"
  638.   for ac_dir in $ac_dummy; do
  639.     test -z "$ac_dir" && ac_dir=.
  640.     if test -f $ac_dir/$ac_word; then
  641.       ac_cv_prog_CC="gcc"
  642.       break
  643.     fi
  644.   done
  645.   IFS="$ac_save_ifs"
  646. fi
  647. fi
  648. CC="$ac_cv_prog_CC"
  649. if test -n "$CC"; then
  650.   echo "$ac_t""$CC" 1>&6
  651. else
  652.   echo "$ac_t""no" 1>&6
  653. fi
  654.  
  655. if test -z "$CC"; then
  656.   # Extract the first word of "cc", so it can be a program name with args.
  657. set dummy cc; ac_word=$2
  658. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  659. echo "configure:660: checking for $ac_word" >&5
  660. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  661.   echo $ac_n "(cached) $ac_c" 1>&6
  662. else
  663.   if test -n "$CC"; then
  664.   ac_cv_prog_CC="$CC" # Let the user override the test.
  665. else
  666.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  667.   ac_prog_rejected=no
  668.   ac_dummy="$PATH"
  669.   for ac_dir in $ac_dummy; do
  670.     test -z "$ac_dir" && ac_dir=.
  671.     if test -f $ac_dir/$ac_word; then
  672.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  673.         ac_prog_rejected=yes
  674.     continue
  675.       fi
  676.       ac_cv_prog_CC="cc"
  677.       break
  678.     fi
  679.   done
  680.   IFS="$ac_save_ifs"
  681. if test $ac_prog_rejected = yes; then
  682.   # We found a bogon in the path, so make sure we never use it.
  683.   set dummy $ac_cv_prog_CC
  684.   shift
  685.   if test $# -gt 0; then
  686.     # We chose a different compiler from the bogus one.
  687.     # However, it has the same basename, so the bogon will be chosen
  688.     # first if we set CC to just the basename; use the full file name.
  689.     shift
  690.     set dummy "$ac_dir/$ac_word" "$@"
  691.     shift
  692.     ac_cv_prog_CC="$@"
  693.   fi
  694. fi
  695. fi
  696. fi
  697. CC="$ac_cv_prog_CC"
  698. if test -n "$CC"; then
  699.   echo "$ac_t""$CC" 1>&6
  700. else
  701.   echo "$ac_t""no" 1>&6
  702. fi
  703.  
  704.   if test -z "$CC"; then
  705.     case "`uname -s`" in
  706.     *win32* | *WIN32*)
  707.       # Extract the first word of "cl", so it can be a program name with args.
  708. set dummy cl; ac_word=$2
  709. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  710. echo "configure:711: checking for $ac_word" >&5
  711. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  712.   echo $ac_n "(cached) $ac_c" 1>&6
  713. else
  714.   if test -n "$CC"; then
  715.   ac_cv_prog_CC="$CC" # Let the user override the test.
  716. else
  717.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  718.   ac_dummy="$PATH"
  719.   for ac_dir in $ac_dummy; do
  720.     test -z "$ac_dir" && ac_dir=.
  721.     if test -f $ac_dir/$ac_word; then
  722.       ac_cv_prog_CC="cl"
  723.       break
  724.     fi
  725.   done
  726.   IFS="$ac_save_ifs"
  727. fi
  728. fi
  729. CC="$ac_cv_prog_CC"
  730. if test -n "$CC"; then
  731.   echo "$ac_t""$CC" 1>&6
  732. else
  733.   echo "$ac_t""no" 1>&6
  734. fi
  735.  ;;
  736.     esac
  737.   fi
  738.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  739. fi
  740.  
  741. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  742. echo "configure:743: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  743.  
  744. ac_ext=c
  745. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  746. ac_cpp='$CPP $CPPFLAGS'
  747. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  748. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  749. cross_compiling=$ac_cv_prog_cc_cross
  750.  
  751. cat > conftest.$ac_ext << EOF
  752.  
  753. #line 754 "configure"
  754. #include "confdefs.h"
  755.  
  756. main(){return(0);}
  757. EOF
  758. if { (eval echo configure:759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  759.   ac_cv_prog_cc_works=yes
  760.   # If we can't run a trivial program, we are probably using a cross compiler.
  761.   if (./conftest; exit) 2>/dev/null; then
  762.     ac_cv_prog_cc_cross=no
  763.   else
  764.     ac_cv_prog_cc_cross=yes
  765.   fi
  766. else
  767.   echo "configure: failed program was:" >&5
  768.   cat conftest.$ac_ext >&5
  769.   ac_cv_prog_cc_works=no
  770. fi
  771. rm -fr conftest*
  772. ac_ext=c
  773. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  774. ac_cpp='$CPP $CPPFLAGS'
  775. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  776. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  777. cross_compiling=$ac_cv_prog_cc_cross
  778.  
  779. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  780. if test $ac_cv_prog_cc_works = no; then
  781.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  782. fi
  783. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  784. echo "configure:785: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  785. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  786. cross_compiling=$ac_cv_prog_cc_cross
  787.  
  788. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  789. echo "configure:790: checking whether we are using GNU C" >&5
  790. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  791.   echo $ac_n "(cached) $ac_c" 1>&6
  792. else
  793.   cat > conftest.c <<EOF
  794. #ifdef __GNUC__
  795.   yes;
  796. #endif
  797. EOF
  798. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  799.   ac_cv_prog_gcc=yes
  800. else
  801.   ac_cv_prog_gcc=no
  802. fi
  803. fi
  804.  
  805. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  806.  
  807. if test $ac_cv_prog_gcc = yes; then
  808.   GCC=yes
  809. else
  810.   GCC=
  811. fi
  812.  
  813. ac_test_CFLAGS="${CFLAGS+set}"
  814. ac_save_CFLAGS="$CFLAGS"
  815. CFLAGS=
  816. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  817. echo "configure:818: checking whether ${CC-cc} accepts -g" >&5
  818. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  819.   echo $ac_n "(cached) $ac_c" 1>&6
  820. else
  821.   echo 'void f(){}' > conftest.c
  822. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  823.   ac_cv_prog_cc_g=yes
  824. else
  825.   ac_cv_prog_cc_g=no
  826. fi
  827. rm -f conftest*
  828.  
  829. fi
  830.  
  831. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  832. if test "$ac_test_CFLAGS" = set; then
  833.   CFLAGS="$ac_save_CFLAGS"
  834. elif test $ac_cv_prog_cc_g = yes; then
  835.   if test "$GCC" = yes; then
  836.     CFLAGS="-g -O2"
  837.   else
  838.     CFLAGS="-g"
  839.   fi
  840. else
  841.   if test "$GCC" = yes; then
  842.     CFLAGS="-O2"
  843.   else
  844.     CFLAGS=
  845.   fi
  846. fi
  847.  
  848. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  849. do
  850. # Extract the first word of "$ac_prog", so it can be a program name with args.
  851. set dummy $ac_prog; ac_word=$2
  852. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  853. echo "configure:854: checking for $ac_word" >&5
  854. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  855.   echo $ac_n "(cached) $ac_c" 1>&6
  856. else
  857.   if test -n "$CXX"; then
  858.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  859. else
  860.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  861.   ac_dummy="$PATH"
  862.   for ac_dir in $ac_dummy; do
  863.     test -z "$ac_dir" && ac_dir=.
  864.     if test -f $ac_dir/$ac_word; then
  865.       ac_cv_prog_CXX="$ac_prog"
  866.       break
  867.     fi
  868.   done
  869.   IFS="$ac_save_ifs"
  870. fi
  871. fi
  872. CXX="$ac_cv_prog_CXX"
  873. if test -n "$CXX"; then
  874.   echo "$ac_t""$CXX" 1>&6
  875. else
  876.   echo "$ac_t""no" 1>&6
  877. fi
  878.  
  879. test -n "$CXX" && break
  880. done
  881. test -n "$CXX" || CXX="gcc"
  882.  
  883.  
  884. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  885. echo "configure:886: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  886.  
  887. ac_ext=C
  888. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  889. ac_cpp='$CXXCPP $CPPFLAGS'
  890. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  891. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  892. cross_compiling=$ac_cv_prog_cxx_cross
  893.  
  894. cat > conftest.$ac_ext << EOF
  895.  
  896. #line 897 "configure"
  897. #include "confdefs.h"
  898.  
  899. int main(){return(0);}
  900. EOF
  901. if { (eval echo configure:902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  902.   ac_cv_prog_cxx_works=yes
  903.   # If we can't run a trivial program, we are probably using a cross compiler.
  904.   if (./conftest; exit) 2>/dev/null; then
  905.     ac_cv_prog_cxx_cross=no
  906.   else
  907.     ac_cv_prog_cxx_cross=yes
  908.   fi
  909. else
  910.   echo "configure: failed program was:" >&5
  911.   cat conftest.$ac_ext >&5
  912.   ac_cv_prog_cxx_works=no
  913. fi
  914. rm -fr conftest*
  915. ac_ext=c
  916. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  917. ac_cpp='$CPP $CPPFLAGS'
  918. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  919. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  920. cross_compiling=$ac_cv_prog_cc_cross
  921.  
  922. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  923. if test $ac_cv_prog_cxx_works = no; then
  924.   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  925. fi
  926. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  927. echo "configure:928: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  928. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  929. cross_compiling=$ac_cv_prog_cxx_cross
  930.  
  931. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  932. echo "configure:933: checking whether we are using GNU C++" >&5
  933. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  934.   echo $ac_n "(cached) $ac_c" 1>&6
  935. else
  936.   cat > conftest.C <<EOF
  937. #ifdef __GNUC__
  938.   yes;
  939. #endif
  940. EOF
  941. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  942.   ac_cv_prog_gxx=yes
  943. else
  944.   ac_cv_prog_gxx=no
  945. fi
  946. fi
  947.  
  948. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  949.  
  950. if test $ac_cv_prog_gxx = yes; then
  951.   GXX=yes
  952. else
  953.   GXX=
  954. fi
  955.  
  956. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  957. ac_save_CXXFLAGS="$CXXFLAGS"
  958. CXXFLAGS=
  959. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  960. echo "configure:961: checking whether ${CXX-g++} accepts -g" >&5
  961. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  962.   echo $ac_n "(cached) $ac_c" 1>&6
  963. else
  964.   echo 'void f(){}' > conftest.cc
  965. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  966.   ac_cv_prog_cxx_g=yes
  967. else
  968.   ac_cv_prog_cxx_g=no
  969. fi
  970. rm -f conftest*
  971.  
  972. fi
  973.  
  974. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  975. if test "$ac_test_CXXFLAGS" = set; then
  976.   CXXFLAGS="$ac_save_CXXFLAGS"
  977. elif test $ac_cv_prog_cxx_g = yes; then
  978.   if test "$GXX" = yes; then
  979.     CXXFLAGS="-g -O2"
  980.   else
  981.     CXXFLAGS="-g"
  982.   fi
  983. else
  984.   if test "$GXX" = yes; then
  985.     CXXFLAGS="-O2"
  986.   else
  987.     CXXFLAGS=
  988.   fi
  989. fi
  990.  
  991.  
  992. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  993. echo "configure:994: checking whether byte ordering is bigendian" >&5
  994. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  995.   echo $ac_n "(cached) $ac_c" 1>&6
  996. else
  997.   ac_cv_c_bigendian=unknown
  998. # See if sys/param.h defines the BYTE_ORDER macro.
  999. cat > conftest.$ac_ext <<EOF
  1000. #line 1001 "configure"
  1001. #include "confdefs.h"
  1002. #include <sys/types.h>
  1003. #include <sys/param.h>
  1004. int main() {
  1005.  
  1006. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  1007.  bogus endian macros
  1008. #endif
  1009. ; return 0; }
  1010. EOF
  1011. if { (eval echo configure:1012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1012.   rm -rf conftest*
  1013.   # It does; now see whether it defined to BIG_ENDIAN or not.
  1014. cat > conftest.$ac_ext <<EOF
  1015. #line 1016 "configure"
  1016. #include "confdefs.h"
  1017. #include <sys/types.h>
  1018. #include <sys/param.h>
  1019. int main() {
  1020.  
  1021. #if BYTE_ORDER != BIG_ENDIAN
  1022.  not big endian
  1023. #endif
  1024. ; return 0; }
  1025. EOF
  1026. if { (eval echo configure:1027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1027.   rm -rf conftest*
  1028.   ac_cv_c_bigendian=yes
  1029. else
  1030.   echo "configure: failed program was:" >&5
  1031.   cat conftest.$ac_ext >&5
  1032.   rm -rf conftest*
  1033.   ac_cv_c_bigendian=no
  1034. fi
  1035. rm -f conftest*
  1036. else
  1037.   echo "configure: failed program was:" >&5
  1038.   cat conftest.$ac_ext >&5
  1039. fi
  1040. rm -f conftest*
  1041. if test $ac_cv_c_bigendian = unknown; then
  1042. if test "$cross_compiling" = yes; then
  1043.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1044. else
  1045.   cat > conftest.$ac_ext <<EOF
  1046. #line 1047 "configure"
  1047. #include "confdefs.h"
  1048. main () {
  1049.   /* Are we little or big endian?  From Harbison&Steele.  */
  1050.   union
  1051.   {
  1052.     long l;
  1053.     char c[sizeof (long)];
  1054.   } u;
  1055.   u.l = 1;
  1056.   exit (u.c[sizeof (long) - 1] == 1);
  1057. }
  1058. EOF
  1059. if { (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1060. then
  1061.   ac_cv_c_bigendian=no
  1062. else
  1063.   echo "configure: failed program was:" >&5
  1064.   cat conftest.$ac_ext >&5
  1065.   rm -fr conftest*
  1066.   ac_cv_c_bigendian=yes
  1067. fi
  1068. rm -fr conftest*
  1069. fi
  1070.  
  1071. fi
  1072. fi
  1073.  
  1074. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  1075. if test $ac_cv_c_bigendian = yes; then
  1076.   cat >> confdefs.h <<\EOF
  1077. #define WORDS_BIGENDIAN 1
  1078. EOF
  1079.  
  1080. fi
  1081.  
  1082.  
  1083. echo $ac_n "checking size of short""... $ac_c" 1>&6
  1084. echo "configure:1085: checking size of short" >&5
  1085. if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  1086.   echo $ac_n "(cached) $ac_c" 1>&6
  1087. else
  1088.   if test "$cross_compiling" = yes; then
  1089.   ac_cv_sizeof_short=2
  1090. else
  1091.   cat > conftest.$ac_ext <<EOF
  1092. #line 1093 "configure"
  1093. #include "confdefs.h"
  1094. #include <stdio.h>
  1095. main()
  1096. {
  1097.   FILE *f=fopen("conftestval", "w");
  1098.   if (!f) exit(1);
  1099.   fprintf(f, "%d\n", sizeof(short));
  1100.   exit(0);
  1101. }
  1102. EOF
  1103. if { (eval echo configure:1104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1104. then
  1105.   ac_cv_sizeof_short=`cat conftestval`
  1106. else
  1107.   echo "configure: failed program was:" >&5
  1108.   cat conftest.$ac_ext >&5
  1109.   rm -fr conftest*
  1110.   ac_cv_sizeof_short=0
  1111. fi
  1112. rm -fr conftest*
  1113. fi
  1114.  
  1115. fi
  1116. echo "$ac_t""$ac_cv_sizeof_short" 1>&6
  1117. cat >> confdefs.h <<EOF
  1118. #define SIZEOF_SHORT $ac_cv_sizeof_short
  1119. EOF
  1120.  
  1121.  
  1122. echo $ac_n "checking size of int""... $ac_c" 1>&6
  1123. echo "configure:1124: checking size of int" >&5
  1124. if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  1125.   echo $ac_n "(cached) $ac_c" 1>&6
  1126. else
  1127.   if test "$cross_compiling" = yes; then
  1128.   ac_cv_sizeof_int=4
  1129. else
  1130.   cat > conftest.$ac_ext <<EOF
  1131. #line 1132 "configure"
  1132. #include "confdefs.h"
  1133. #include <stdio.h>
  1134. main()
  1135. {
  1136.   FILE *f=fopen("conftestval", "w");
  1137.   if (!f) exit(1);
  1138.   fprintf(f, "%d\n", sizeof(int));
  1139.   exit(0);
  1140. }
  1141. EOF
  1142. if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1143. then
  1144.   ac_cv_sizeof_int=`cat conftestval`
  1145. else
  1146.   echo "configure: failed program was:" >&5
  1147.   cat conftest.$ac_ext >&5
  1148.   rm -fr conftest*
  1149.   ac_cv_sizeof_int=0
  1150. fi
  1151. rm -fr conftest*
  1152. fi
  1153.  
  1154. fi
  1155. echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  1156. cat >> confdefs.h <<EOF
  1157. #define SIZEOF_INT $ac_cv_sizeof_int
  1158. EOF
  1159.  
  1160.  
  1161. echo $ac_n "checking size of long""... $ac_c" 1>&6
  1162. echo "configure:1163: checking size of long" >&5
  1163. if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  1164.   echo $ac_n "(cached) $ac_c" 1>&6
  1165. else
  1166.   if test "$cross_compiling" = yes; then
  1167.   ac_cv_sizeof_long=4
  1168. else
  1169.   cat > conftest.$ac_ext <<EOF
  1170. #line 1171 "configure"
  1171. #include "confdefs.h"
  1172. #include <stdio.h>
  1173. main()
  1174. {
  1175.   FILE *f=fopen("conftestval", "w");
  1176.   if (!f) exit(1);
  1177.   fprintf(f, "%d\n", sizeof(long));
  1178.   exit(0);
  1179. }
  1180. EOF
  1181. if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1182. then
  1183.   ac_cv_sizeof_long=`cat conftestval`
  1184. else
  1185.   echo "configure: failed program was:" >&5
  1186.   cat conftest.$ac_ext >&5
  1187.   rm -fr conftest*
  1188.   ac_cv_sizeof_long=0
  1189. fi
  1190. rm -fr conftest*
  1191. fi
  1192.  
  1193. fi
  1194. echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  1195. cat >> confdefs.h <<EOF
  1196. #define SIZEOF_LONG $ac_cv_sizeof_long
  1197. EOF
  1198.  
  1199.  
  1200. if test $ac_cv_sizeof_short -eq 2; then
  1201.     cat >> confdefs.h <<\EOF
  1202. #define U16 unsigned short
  1203. EOF
  1204.  
  1205. fi
  1206. if test $ac_cv_sizeof_int -eq 4; then
  1207.     cat >> confdefs.h <<\EOF
  1208. #define U32 unsigned
  1209. EOF
  1210.  
  1211. else
  1212.     if test $ac_cv_sizeof_long -eq 4; then
  1213.         cat >> confdefs.h <<\EOF
  1214. #define U32 unsigned long
  1215. EOF
  1216.  
  1217.     fi
  1218. fi
  1219. if test $ac_cv_sizeof_int -eq 8; then
  1220.     cat >> confdefs.h <<\EOF
  1221. #define U64 unsigned
  1222. EOF
  1223.  
  1224. else
  1225.     if test $ac_cv_sizeof_long -eq 8; then
  1226.         cat >> confdefs.h <<\EOF
  1227. #define U64 unsigned long
  1228. EOF
  1229.  
  1230.     fi
  1231. fi
  1232.  
  1233. ac_header_dirent=no
  1234. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1235. do
  1236. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1237. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1238. echo "configure:1239: checking for $ac_hdr that defines DIR" >&5
  1239. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1240.   echo $ac_n "(cached) $ac_c" 1>&6
  1241. else
  1242.   cat > conftest.$ac_ext <<EOF
  1243. #line 1244 "configure"
  1244. #include "confdefs.h"
  1245. #include <sys/types.h>
  1246. #include <$ac_hdr>
  1247. int main() {
  1248. DIR *dirp = 0;
  1249. ; return 0; }
  1250. EOF
  1251. if { (eval echo configure:1252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1252.   rm -rf conftest*
  1253.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1254. else
  1255.   echo "configure: failed program was:" >&5
  1256.   cat conftest.$ac_ext >&5
  1257.   rm -rf conftest*
  1258.   eval "ac_cv_header_dirent_$ac_safe=no"
  1259. fi
  1260. rm -f conftest*
  1261. fi
  1262. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1263.   echo "$ac_t""yes" 1>&6
  1264.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1265.   cat >> confdefs.h <<EOF
  1266. #define $ac_tr_hdr 1
  1267. EOF
  1268.  ac_header_dirent=$ac_hdr; break
  1269. else
  1270.   echo "$ac_t""no" 1>&6
  1271. fi
  1272. done
  1273. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1274. if test $ac_header_dirent = dirent.h; then
  1275. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  1276. echo "configure:1277: checking for opendir in -ldir" >&5
  1277. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  1278. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1279.   echo $ac_n "(cached) $ac_c" 1>&6
  1280. else
  1281.   ac_save_LIBS="$LIBS"
  1282. LIBS="-ldir  $LIBS"
  1283. cat > conftest.$ac_ext <<EOF
  1284. #line 1285 "configure"
  1285. #include "confdefs.h"
  1286. /* Override any gcc2 internal prototype to avoid an error.  */
  1287. /* We use char because int might match the return type of a gcc2
  1288.     builtin and then its argument prototype would still apply.  */
  1289. char opendir();
  1290.  
  1291. int main() {
  1292. opendir()
  1293. ; return 0; }
  1294. EOF
  1295. if { (eval echo configure:1296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1296.   rm -rf conftest*
  1297.   eval "ac_cv_lib_$ac_lib_var=yes"
  1298. else
  1299.   echo "configure: failed program was:" >&5
  1300.   cat conftest.$ac_ext >&5
  1301.   rm -rf conftest*
  1302.   eval "ac_cv_lib_$ac_lib_var=no"
  1303. fi
  1304. rm -f conftest*
  1305. LIBS="$ac_save_LIBS"
  1306.  
  1307. fi
  1308. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1309.   echo "$ac_t""yes" 1>&6
  1310.   LIBS="$LIBS -ldir"
  1311. else
  1312.   echo "$ac_t""no" 1>&6
  1313. fi
  1314.  
  1315. else
  1316. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  1317. echo "configure:1318: checking for opendir in -lx" >&5
  1318. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  1319. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1320.   echo $ac_n "(cached) $ac_c" 1>&6
  1321. else
  1322.   ac_save_LIBS="$LIBS"
  1323. LIBS="-lx  $LIBS"
  1324. cat > conftest.$ac_ext <<EOF
  1325. #line 1326 "configure"
  1326. #include "confdefs.h"
  1327. /* Override any gcc2 internal prototype to avoid an error.  */
  1328. /* We use char because int might match the return type of a gcc2
  1329.     builtin and then its argument prototype would still apply.  */
  1330. char opendir();
  1331.  
  1332. int main() {
  1333. opendir()
  1334. ; return 0; }
  1335. EOF
  1336. if { (eval echo configure:1337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1337.   rm -rf conftest*
  1338.   eval "ac_cv_lib_$ac_lib_var=yes"
  1339. else
  1340.   echo "configure: failed program was:" >&5
  1341.   cat conftest.$ac_ext >&5
  1342.   rm -rf conftest*
  1343.   eval "ac_cv_lib_$ac_lib_var=no"
  1344. fi
  1345. rm -f conftest*
  1346. LIBS="$ac_save_LIBS"
  1347.  
  1348. fi
  1349. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1350.   echo "$ac_t""yes" 1>&6
  1351.   LIBS="$LIBS -lx"
  1352. else
  1353.   echo "$ac_t""no" 1>&6
  1354. fi
  1355.  
  1356. fi
  1357.  
  1358. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1359. echo "configure:1360: checking how to run the C preprocessor" >&5
  1360. # On Suns, sometimes $CPP names a directory.
  1361. if test -n "$CPP" && test -d "$CPP"; then
  1362.   CPP=
  1363. fi
  1364. if test -z "$CPP"; then
  1365. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1366.   echo $ac_n "(cached) $ac_c" 1>&6
  1367. else
  1368.     # This must be in double quotes, not single quotes, because CPP may get
  1369.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1370.   CPP="${CC-cc} -E"
  1371.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1372.   # not just through cpp.
  1373.   cat > conftest.$ac_ext <<EOF
  1374. #line 1375 "configure"
  1375. #include "confdefs.h"
  1376. #include <assert.h>
  1377. Syntax Error
  1378. EOF
  1379. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1380. { (eval echo configure:1381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1381. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1382. if test -z "$ac_err"; then
  1383.   :
  1384. else
  1385.   echo "$ac_err" >&5
  1386.   echo "configure: failed program was:" >&5
  1387.   cat conftest.$ac_ext >&5
  1388.   rm -rf conftest*
  1389.   CPP="${CC-cc} -E -traditional-cpp"
  1390.   cat > conftest.$ac_ext <<EOF
  1391. #line 1392 "configure"
  1392. #include "confdefs.h"
  1393. #include <assert.h>
  1394. Syntax Error
  1395. EOF
  1396. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1397. { (eval echo configure:1398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1398. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1399. if test -z "$ac_err"; then
  1400.   :
  1401. else
  1402.   echo "$ac_err" >&5
  1403.   echo "configure: failed program was:" >&5
  1404.   cat conftest.$ac_ext >&5
  1405.   rm -rf conftest*
  1406.   CPP="${CC-cc} -nologo -E"
  1407.   cat > conftest.$ac_ext <<EOF
  1408. #line 1409 "configure"
  1409. #include "confdefs.h"
  1410. #include <assert.h>
  1411. Syntax Error
  1412. EOF
  1413. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1414. { (eval echo configure:1415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1415. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1416. if test -z "$ac_err"; then
  1417.   :
  1418. else
  1419.   echo "$ac_err" >&5
  1420.   echo "configure: failed program was:" >&5
  1421.   cat conftest.$ac_ext >&5
  1422.   rm -rf conftest*
  1423.   CPP=/lib/cpp
  1424. fi
  1425. rm -f conftest*
  1426. fi
  1427. rm -f conftest*
  1428. fi
  1429. rm -f conftest*
  1430.   ac_cv_prog_CPP="$CPP"
  1431. fi
  1432.   CPP="$ac_cv_prog_CPP"
  1433. else
  1434.   ac_cv_prog_CPP="$CPP"
  1435. fi
  1436. echo "$ac_t""$CPP" 1>&6
  1437.  
  1438. ac_safe=`echo "sys/select.h" | sed 'y%./+-%__p_%'`
  1439. echo $ac_n "checking for sys/select.h""... $ac_c" 1>&6
  1440. echo "configure:1441: checking for sys/select.h" >&5
  1441. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1442.   echo $ac_n "(cached) $ac_c" 1>&6
  1443. else
  1444.   cat > conftest.$ac_ext <<EOF
  1445. #line 1446 "configure"
  1446. #include "confdefs.h"
  1447. #include <sys/select.h>
  1448. EOF
  1449. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1450. { (eval echo configure:1451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1451. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1452. if test -z "$ac_err"; then
  1453.   rm -rf conftest*
  1454.   eval "ac_cv_header_$ac_safe=yes"
  1455. else
  1456.   echo "$ac_err" >&5
  1457.   echo "configure: failed program was:" >&5
  1458.   cat conftest.$ac_ext >&5
  1459.   rm -rf conftest*
  1460.   eval "ac_cv_header_$ac_safe=no"
  1461. fi
  1462. rm -f conftest*
  1463. fi
  1464. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1465.   echo "$ac_t""yes" 1>&6
  1466.   :
  1467. else
  1468.   echo "$ac_t""no" 1>&6
  1469. fi
  1470.  
  1471. echo $ac_n "checking for scandir""... $ac_c" 1>&6
  1472. echo "configure:1473: checking for scandir" >&5
  1473. if eval "test \"`echo '$''{'ac_cv_func_scandir'+set}'`\" = set"; then
  1474.   echo $ac_n "(cached) $ac_c" 1>&6
  1475. else
  1476.   cat > conftest.$ac_ext <<EOF
  1477. #line 1478 "configure"
  1478. #include "confdefs.h"
  1479. /* System header to define __stub macros and hopefully few prototypes,
  1480.     which can conflict with char scandir(); below.  */
  1481. #include <assert.h>
  1482. /* Override any gcc2 internal prototype to avoid an error.  */
  1483. /* We use char because int might match the return type of a gcc2
  1484.     builtin and then its argument prototype would still apply.  */
  1485. char scandir();
  1486.  
  1487. int main() {
  1488.  
  1489. /* The GNU C library defines this for functions which it implements
  1490.     to always fail with ENOSYS.  Some functions are actually named
  1491.     something starting with __ and the normal name is an alias.  */
  1492. #if defined (__stub_scandir) || defined (__stub___scandir)
  1493. choke me
  1494. #else
  1495. scandir();
  1496. #endif
  1497.  
  1498. ; return 0; }
  1499. EOF
  1500. if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1501.   rm -rf conftest*
  1502.   eval "ac_cv_func_scandir=yes"
  1503. else
  1504.   echo "configure: failed program was:" >&5
  1505.   cat conftest.$ac_ext >&5
  1506.   rm -rf conftest*
  1507.   eval "ac_cv_func_scandir=no"
  1508. fi
  1509. rm -f conftest*
  1510. fi
  1511.  
  1512. if eval "test \"`echo '$ac_cv_func_'scandir`\" = yes"; then
  1513.   echo "$ac_t""yes" 1>&6
  1514.   if test "$uname" = "SunOS"; then
  1515.     echo Not using Solaris scandir BSD emulation function.
  1516.     else
  1517.         cat >> confdefs.h <<\EOF
  1518. #define HAVE_SCANDIR 1
  1519. EOF
  1520.  
  1521.     fi
  1522. else
  1523.   echo "$ac_t""no" 1>&6
  1524. fi
  1525.  
  1526. echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
  1527. echo "configure:1528: checking for vsnprintf" >&5
  1528. if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
  1529.   echo $ac_n "(cached) $ac_c" 1>&6
  1530. else
  1531.   cat > conftest.$ac_ext <<EOF
  1532. #line 1533 "configure"
  1533. #include "confdefs.h"
  1534. /* System header to define __stub macros and hopefully few prototypes,
  1535.     which can conflict with char vsnprintf(); below.  */
  1536. #include <assert.h>
  1537. /* Override any gcc2 internal prototype to avoid an error.  */
  1538. /* We use char because int might match the return type of a gcc2
  1539.     builtin and then its argument prototype would still apply.  */
  1540. char vsnprintf();
  1541.  
  1542. int main() {
  1543.  
  1544. /* The GNU C library defines this for functions which it implements
  1545.     to always fail with ENOSYS.  Some functions are actually named
  1546.     something starting with __ and the normal name is an alias.  */
  1547. #if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
  1548. choke me
  1549. #else
  1550. vsnprintf();
  1551. #endif
  1552.  
  1553. ; return 0; }
  1554. EOF
  1555. if { (eval echo configure:1556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1556.   rm -rf conftest*
  1557.   eval "ac_cv_func_vsnprintf=yes"
  1558. else
  1559.   echo "configure: failed program was:" >&5
  1560.   cat conftest.$ac_ext >&5
  1561.   rm -rf conftest*
  1562.   eval "ac_cv_func_vsnprintf=no"
  1563. fi
  1564. rm -f conftest*
  1565. fi
  1566.  
  1567. if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then
  1568.   echo "$ac_t""yes" 1>&6
  1569.   if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
  1570.     echo Not using built-in vsnprintf function because you are running HP-UX 10.20.
  1571.     else
  1572.         cat >> confdefs.h <<\EOF
  1573. #define HAVE_VSNPRINTF 1
  1574. EOF
  1575.  
  1576.     fi
  1577. else
  1578.   echo "$ac_t""no" 1>&6
  1579. fi
  1580.  
  1581. echo $ac_n "checking for snprintf""... $ac_c" 1>&6
  1582. echo "configure:1583: checking for snprintf" >&5
  1583. if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
  1584.   echo $ac_n "(cached) $ac_c" 1>&6
  1585. else
  1586.   cat > conftest.$ac_ext <<EOF
  1587. #line 1588 "configure"
  1588. #include "confdefs.h"
  1589. /* System header to define __stub macros and hopefully few prototypes,
  1590.     which can conflict with char snprintf(); below.  */
  1591. #include <assert.h>
  1592. /* Override any gcc2 internal prototype to avoid an error.  */
  1593. /* We use char because int might match the return type of a gcc2
  1594.     builtin and then its argument prototype would still apply.  */
  1595. char snprintf();
  1596.  
  1597. int main() {
  1598.  
  1599. /* The GNU C library defines this for functions which it implements
  1600.     to always fail with ENOSYS.  Some functions are actually named
  1601.     something starting with __ and the normal name is an alias.  */
  1602. #if defined (__stub_snprintf) || defined (__stub___snprintf)
  1603. choke me
  1604. #else
  1605. snprintf();
  1606. #endif
  1607.  
  1608. ; return 0; }
  1609. EOF
  1610. if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1611.   rm -rf conftest*
  1612.   eval "ac_cv_func_snprintf=yes"
  1613. else
  1614.   echo "configure: failed program was:" >&5
  1615.   cat conftest.$ac_ext >&5
  1616.   rm -rf conftest*
  1617.   eval "ac_cv_func_snprintf=no"
  1618. fi
  1619. rm -f conftest*
  1620. fi
  1621.  
  1622. if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
  1623.   echo "$ac_t""yes" 1>&6
  1624.   if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
  1625.     echo Not using built-in snprintf function because you are running HP-UX 10.20.
  1626.     else
  1627.         cat >> confdefs.h <<\EOF
  1628. #define HAVE_SNPRINTF 1
  1629. EOF
  1630.  
  1631.     fi
  1632. else
  1633.   echo "$ac_t""no" 1>&6
  1634. fi
  1635.  
  1636. for ac_func in vsprintf
  1637. do
  1638. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1639. echo "configure:1640: checking for $ac_func" >&5
  1640. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1641.   echo $ac_n "(cached) $ac_c" 1>&6
  1642. else
  1643.   cat > conftest.$ac_ext <<EOF
  1644. #line 1645 "configure"
  1645. #include "confdefs.h"
  1646. /* System header to define __stub macros and hopefully few prototypes,
  1647.     which can conflict with char $ac_func(); below.  */
  1648. #include <assert.h>
  1649. /* Override any gcc2 internal prototype to avoid an error.  */
  1650. /* We use char because int might match the return type of a gcc2
  1651.     builtin and then its argument prototype would still apply.  */
  1652. char $ac_func();
  1653.  
  1654. int main() {
  1655.  
  1656. /* The GNU C library defines this for functions which it implements
  1657.     to always fail with ENOSYS.  Some functions are actually named
  1658.     something starting with __ and the normal name is an alias.  */
  1659. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1660. choke me
  1661. #else
  1662. $ac_func();
  1663. #endif
  1664.  
  1665. ; return 0; }
  1666. EOF
  1667. if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1668.   rm -rf conftest*
  1669.   eval "ac_cv_func_$ac_func=yes"
  1670. else
  1671.   echo "configure: failed program was:" >&5
  1672.   cat conftest.$ac_ext >&5
  1673.   rm -rf conftest*
  1674.   eval "ac_cv_func_$ac_func=no"
  1675. fi
  1676. rm -f conftest*
  1677. fi
  1678.  
  1679. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1680.   echo "$ac_t""yes" 1>&6
  1681.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1682.   cat >> confdefs.h <<EOF
  1683. #define $ac_tr_func 1
  1684. EOF
  1685.  
  1686. else
  1687.   echo "$ac_t""no" 1>&6
  1688. fi
  1689. done
  1690.  
  1691.  
  1692. # If we find X, set shell vars x_includes and x_libraries to the
  1693. # paths, otherwise set no_x=yes.
  1694. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1695. # --without-x overrides everything else, but does not touch the cache.
  1696. echo $ac_n "checking for X""... $ac_c" 1>&6
  1697. echo "configure:1698: checking for X" >&5
  1698.  
  1699. # Check whether --with-x or --without-x was given.
  1700. if test "${with_x+set}" = set; then
  1701.   withval="$with_x"
  1702.   :
  1703. fi
  1704.  
  1705. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1706. if test "x$with_x" = xno; then
  1707.   # The user explicitly disabled X.
  1708.   have_x=disabled
  1709. else
  1710.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1711.     # Both variables are already set.
  1712.     have_x=yes
  1713.   else
  1714. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1715.   echo $ac_n "(cached) $ac_c" 1>&6
  1716. else
  1717.   # One or both of the vars are not set, and there is no cached value.
  1718. ac_x_includes=NO ac_x_libraries=NO
  1719. rm -fr conftestdir
  1720. if mkdir conftestdir; then
  1721.   cd conftestdir
  1722.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1723.   cat > Imakefile <<'EOF'
  1724. acfindx:
  1725.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1726. EOF
  1727.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1728.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1729.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1730.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1731.     for ac_extension in a so sl; do
  1732.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1733.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1734.         ac_im_usrlibdir=$ac_im_libdir; break
  1735.       fi
  1736.     done
  1737.     # Screen out bogus values from the imake configuration.  They are
  1738.     # bogus both because they are the default anyway, and because
  1739.     # using them would break gcc on systems where it needs fixed includes.
  1740.     case "$ac_im_incroot" in
  1741.     /usr/include) ;;
  1742.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1743.     esac
  1744.     case "$ac_im_usrlibdir" in
  1745.     /usr/lib | /lib) ;;
  1746.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1747.     esac
  1748.   fi
  1749.   cd ..
  1750.   rm -fr conftestdir
  1751. fi
  1752.  
  1753. if test "$ac_x_includes" = NO; then
  1754.   # Guess where to find include files, by looking for this one X11 .h file.
  1755.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1756.  
  1757.   # First, try using that file with no special directory specified.
  1758. cat > conftest.$ac_ext <<EOF
  1759. #line 1760 "configure"
  1760. #include "confdefs.h"
  1761. #include <$x_direct_test_include>
  1762. EOF
  1763. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1764. { (eval echo configure:1765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1765. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1766. if test -z "$ac_err"; then
  1767.   rm -rf conftest*
  1768.   # We can compile using X headers with no special include directory.
  1769. ac_x_includes=
  1770. else
  1771.   echo "$ac_err" >&5
  1772.   echo "configure: failed program was:" >&5
  1773.   cat conftest.$ac_ext >&5
  1774.   rm -rf conftest*
  1775.   # Look for the header file in a standard set of common directories.
  1776. # Check X11 before X11Rn because it is often a symlink to the current release.
  1777.   for ac_dir in               \
  1778.     /usr/X11/include          \
  1779.     /usr/X11R6/include        \
  1780.     /usr/X11R5/include        \
  1781.     /usr/X11R4/include        \
  1782.                               \
  1783.     /usr/include/X11          \
  1784.     /usr/include/X11R6        \
  1785.     /usr/include/X11R5        \
  1786.     /usr/include/X11R4        \
  1787.                               \
  1788.     /usr/local/X11/include    \
  1789.     /usr/local/X11R6/include  \
  1790.     /usr/local/X11R5/include  \
  1791.     /usr/local/X11R4/include  \
  1792.                               \
  1793.     /usr/local/include/X11    \
  1794.     /usr/local/include/X11R6  \
  1795.     /usr/local/include/X11R5  \
  1796.     /usr/local/include/X11R4  \
  1797.                               \
  1798.     /usr/X386/include         \
  1799.     /usr/x386/include         \
  1800.     /usr/XFree86/include/X11  \
  1801.                               \
  1802.     /usr/include              \
  1803.     /usr/local/include        \
  1804.     /usr/unsupported/include  \
  1805.     /usr/athena/include       \
  1806.     /usr/local/x11r5/include  \
  1807.     /usr/lpp/Xamples/include  \
  1808.                               \
  1809.     /usr/openwin/include      \
  1810.     /usr/openwin/share/include \
  1811.     ; \
  1812.   do
  1813.     if test -r "$ac_dir/$x_direct_test_include"; then
  1814.       ac_x_includes=$ac_dir
  1815.       break
  1816.     fi
  1817.   done
  1818. fi
  1819. rm -f conftest*
  1820. fi # $ac_x_includes = NO
  1821.  
  1822. if test "$ac_x_libraries" = NO; then
  1823.   # Check for the libraries.
  1824.  
  1825.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  1826.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  1827.  
  1828.   # See if we find them without any special options.
  1829.   # Don't add to $LIBS permanently.
  1830.   ac_save_LIBS="$LIBS"
  1831.   LIBS="-l$x_direct_test_library $LIBS"
  1832. cat > conftest.$ac_ext <<EOF
  1833. #line 1834 "configure"
  1834. #include "confdefs.h"
  1835.  
  1836. int main() {
  1837. ${x_direct_test_function}()
  1838. ; return 0; }
  1839. EOF
  1840. if { (eval echo configure:1841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1841.   rm -rf conftest*
  1842.   LIBS="$ac_save_LIBS"
  1843. # We can link X programs with no special library path.
  1844. ac_x_libraries=
  1845. else
  1846.   echo "configure: failed program was:" >&5
  1847.   cat conftest.$ac_ext >&5
  1848.   rm -rf conftest*
  1849.   LIBS="$ac_save_LIBS"
  1850. # First see if replacing the include by lib works.
  1851. # Check X11 before X11Rn because it is often a symlink to the current release.
  1852. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1853.     /usr/X11/lib          \
  1854.     /usr/X11R6/lib        \
  1855.     /usr/X11R5/lib        \
  1856.     /usr/X11R4/lib        \
  1857.                           \
  1858.     /usr/lib/X11          \
  1859.     /usr/lib/X11R6        \
  1860.     /usr/lib/X11R5        \
  1861.     /usr/lib/X11R4        \
  1862.                           \
  1863.     /usr/local/X11/lib    \
  1864.     /usr/local/X11R6/lib  \
  1865.     /usr/local/X11R5/lib  \
  1866.     /usr/local/X11R4/lib  \
  1867.                           \
  1868.     /usr/local/lib/X11    \
  1869.     /usr/local/lib/X11R6  \
  1870.     /usr/local/lib/X11R5  \
  1871.     /usr/local/lib/X11R4  \
  1872.                           \
  1873.     /usr/X386/lib         \
  1874.     /usr/x386/lib         \
  1875.     /usr/XFree86/lib/X11  \
  1876.                           \
  1877.     /usr/lib              \
  1878.     /usr/local/lib        \
  1879.     /usr/unsupported/lib  \
  1880.     /usr/athena/lib       \
  1881.     /usr/local/x11r5/lib  \
  1882.     /usr/lpp/Xamples/lib  \
  1883.     /lib/usr/lib/X11      \
  1884.                           \
  1885.     /usr/openwin/lib      \
  1886.     /usr/openwin/share/lib \
  1887.     ; \
  1888. do
  1889.   for ac_extension in a so sl; do
  1890.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1891.       ac_x_libraries=$ac_dir
  1892.       break 2
  1893.     fi
  1894.   done
  1895. done
  1896. fi
  1897. rm -f conftest*
  1898. fi # $ac_x_libraries = NO
  1899.  
  1900. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  1901.   # Didn't find X anywhere.  Cache the known absence of X.
  1902.   ac_cv_have_x="have_x=no"
  1903. else
  1904.   # Record where we found X for the cache.
  1905.   ac_cv_have_x="have_x=yes \
  1906.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1907. fi
  1908. fi
  1909.   fi
  1910.   eval "$ac_cv_have_x"
  1911. fi # $with_x != no
  1912.  
  1913. if test "$have_x" != yes; then
  1914.   echo "$ac_t""$have_x" 1>&6
  1915.   no_x=yes
  1916. else
  1917.   # If each of the values was on the command line, it overrides each guess.
  1918.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1919.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1920.   # Update the cache value to reflect the command line values.
  1921.   ac_cv_have_x="have_x=yes \
  1922.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1923.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  1924. fi
  1925.  
  1926. if test "$no_x" = yes; then
  1927.   # Not all programs may use this symbol, but it does not hurt to define it.
  1928.   cat >> confdefs.h <<\EOF
  1929. #define X_DISPLAY_MISSING 1
  1930. EOF
  1931.  
  1932.   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  1933. else
  1934.   if test -n "$x_includes"; then
  1935.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  1936.   fi
  1937.  
  1938.   # It would also be nice to do this for all -L options, not just this one.
  1939.   if test -n "$x_libraries"; then
  1940.     X_LIBS="$X_LIBS -L$x_libraries"
  1941.     # For Solaris; some versions of Sun CC require a space after -R and
  1942.     # others require no space.  Words are not sufficient . . . .
  1943.     case "`(uname -sr) 2>/dev/null`" in
  1944.     "SunOS 5"*)
  1945.       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  1946. echo "configure:1947: checking whether -R must be followed by a space" >&5
  1947.       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  1948.       cat > conftest.$ac_ext <<EOF
  1949. #line 1950 "configure"
  1950. #include "confdefs.h"
  1951.  
  1952. int main() {
  1953.  
  1954. ; return 0; }
  1955. EOF
  1956. if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1957.   rm -rf conftest*
  1958.   ac_R_nospace=yes
  1959. else
  1960.   echo "configure: failed program was:" >&5
  1961.   cat conftest.$ac_ext >&5
  1962.   rm -rf conftest*
  1963.   ac_R_nospace=no
  1964. fi
  1965. rm -f conftest*
  1966.       if test $ac_R_nospace = yes; then
  1967.     echo "$ac_t""no" 1>&6
  1968.     X_LIBS="$X_LIBS -R$x_libraries"
  1969.       else
  1970.     LIBS="$ac_xsave_LIBS -R $x_libraries"
  1971.     cat > conftest.$ac_ext <<EOF
  1972. #line 1973 "configure"
  1973. #include "confdefs.h"
  1974.  
  1975. int main() {
  1976.  
  1977. ; return 0; }
  1978. EOF
  1979. if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1980.   rm -rf conftest*
  1981.   ac_R_space=yes
  1982. else
  1983.   echo "configure: failed program was:" >&5
  1984.   cat conftest.$ac_ext >&5
  1985.   rm -rf conftest*
  1986.   ac_R_space=no
  1987. fi
  1988. rm -f conftest*
  1989.     if test $ac_R_space = yes; then
  1990.       echo "$ac_t""yes" 1>&6
  1991.       X_LIBS="$X_LIBS -R $x_libraries"
  1992.     else
  1993.       echo "$ac_t""neither works" 1>&6
  1994.     fi
  1995.       fi
  1996.       LIBS="$ac_xsave_LIBS"
  1997.     esac
  1998.   fi
  1999.  
  2000.   # Check for system-dependent libraries X programs must link with.
  2001.   # Do this before checking for the system-independent R6 libraries
  2002.   # (-lICE), since we may need -lsocket or whatever for X linking.
  2003.  
  2004.   if test "$ISC" = yes; then
  2005.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  2006.   else
  2007.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  2008.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  2009.     # the Alpha needs dnet_stub (dnet does not exist).
  2010.     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  2011. echo "configure:2012: checking for dnet_ntoa in -ldnet" >&5
  2012. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2013. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2014.   echo $ac_n "(cached) $ac_c" 1>&6
  2015. else
  2016.   ac_save_LIBS="$LIBS"
  2017. LIBS="-ldnet  $LIBS"
  2018. cat > conftest.$ac_ext <<EOF
  2019. #line 2020 "configure"
  2020. #include "confdefs.h"
  2021. /* Override any gcc2 internal prototype to avoid an error.  */
  2022. /* We use char because int might match the return type of a gcc2
  2023.     builtin and then its argument prototype would still apply.  */
  2024. char dnet_ntoa();
  2025.  
  2026. int main() {
  2027. dnet_ntoa()
  2028. ; return 0; }
  2029. EOF
  2030. if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2031.   rm -rf conftest*
  2032.   eval "ac_cv_lib_$ac_lib_var=yes"
  2033. else
  2034.   echo "configure: failed program was:" >&5
  2035.   cat conftest.$ac_ext >&5
  2036.   rm -rf conftest*
  2037.   eval "ac_cv_lib_$ac_lib_var=no"
  2038. fi
  2039. rm -f conftest*
  2040. LIBS="$ac_save_LIBS"
  2041.  
  2042. fi
  2043. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2044.   echo "$ac_t""yes" 1>&6
  2045.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  2046. else
  2047.   echo "$ac_t""no" 1>&6
  2048. fi
  2049.  
  2050.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  2051.       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  2052. echo "configure:2053: checking for dnet_ntoa in -ldnet_stub" >&5
  2053. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2054. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2055.   echo $ac_n "(cached) $ac_c" 1>&6
  2056. else
  2057.   ac_save_LIBS="$LIBS"
  2058. LIBS="-ldnet_stub  $LIBS"
  2059. cat > conftest.$ac_ext <<EOF
  2060. #line 2061 "configure"
  2061. #include "confdefs.h"
  2062. /* Override any gcc2 internal prototype to avoid an error.  */
  2063. /* We use char because int might match the return type of a gcc2
  2064.     builtin and then its argument prototype would still apply.  */
  2065. char dnet_ntoa();
  2066.  
  2067. int main() {
  2068. dnet_ntoa()
  2069. ; return 0; }
  2070. EOF
  2071. if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2072.   rm -rf conftest*
  2073.   eval "ac_cv_lib_$ac_lib_var=yes"
  2074. else
  2075.   echo "configure: failed program was:" >&5
  2076.   cat conftest.$ac_ext >&5
  2077.   rm -rf conftest*
  2078.   eval "ac_cv_lib_$ac_lib_var=no"
  2079. fi
  2080. rm -f conftest*
  2081. LIBS="$ac_save_LIBS"
  2082.  
  2083. fi
  2084. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2085.   echo "$ac_t""yes" 1>&6
  2086.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  2087. else
  2088.   echo "$ac_t""no" 1>&6
  2089. fi
  2090.  
  2091.     fi
  2092.  
  2093.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  2094.     # to get the SysV transport functions.
  2095.     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  2096.     # needs -lnsl.
  2097.     # The nsl library prevents programs from opening the X display
  2098.     # on Irix 5.2, according to dickey@clark.net.
  2099.     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  2100. echo "configure:2101: checking for gethostbyname" >&5
  2101. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  2102.   echo $ac_n "(cached) $ac_c" 1>&6
  2103. else
  2104.   cat > conftest.$ac_ext <<EOF
  2105. #line 2106 "configure"
  2106. #include "confdefs.h"
  2107. /* System header to define __stub macros and hopefully few prototypes,
  2108.     which can conflict with char gethostbyname(); below.  */
  2109. #include <assert.h>
  2110. /* Override any gcc2 internal prototype to avoid an error.  */
  2111. /* We use char because int might match the return type of a gcc2
  2112.     builtin and then its argument prototype would still apply.  */
  2113. char gethostbyname();
  2114.  
  2115. int main() {
  2116.  
  2117. /* The GNU C library defines this for functions which it implements
  2118.     to always fail with ENOSYS.  Some functions are actually named
  2119.     something starting with __ and the normal name is an alias.  */
  2120. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  2121. choke me
  2122. #else
  2123. gethostbyname();
  2124. #endif
  2125.  
  2126. ; return 0; }
  2127. EOF
  2128. if { (eval echo configure:2129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2129.   rm -rf conftest*
  2130.   eval "ac_cv_func_gethostbyname=yes"
  2131. else
  2132.   echo "configure: failed program was:" >&5
  2133.   cat conftest.$ac_ext >&5
  2134.   rm -rf conftest*
  2135.   eval "ac_cv_func_gethostbyname=no"
  2136. fi
  2137. rm -f conftest*
  2138. fi
  2139.  
  2140. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  2141.   echo "$ac_t""yes" 1>&6
  2142.   :
  2143. else
  2144.   echo "$ac_t""no" 1>&6
  2145. fi
  2146.  
  2147.     if test $ac_cv_func_gethostbyname = no; then
  2148.       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  2149. echo "configure:2150: checking for gethostbyname in -lnsl" >&5
  2150. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  2151. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2152.   echo $ac_n "(cached) $ac_c" 1>&6
  2153. else
  2154.   ac_save_LIBS="$LIBS"
  2155. LIBS="-lnsl  $LIBS"
  2156. cat > conftest.$ac_ext <<EOF
  2157. #line 2158 "configure"
  2158. #include "confdefs.h"
  2159. /* Override any gcc2 internal prototype to avoid an error.  */
  2160. /* We use char because int might match the return type of a gcc2
  2161.     builtin and then its argument prototype would still apply.  */
  2162. char gethostbyname();
  2163.  
  2164. int main() {
  2165. gethostbyname()
  2166. ; return 0; }
  2167. EOF
  2168. if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2169.   rm -rf conftest*
  2170.   eval "ac_cv_lib_$ac_lib_var=yes"
  2171. else
  2172.   echo "configure: failed program was:" >&5
  2173.   cat conftest.$ac_ext >&5
  2174.   rm -rf conftest*
  2175.   eval "ac_cv_lib_$ac_lib_var=no"
  2176. fi
  2177. rm -f conftest*
  2178. LIBS="$ac_save_LIBS"
  2179.  
  2180. fi
  2181. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2182.   echo "$ac_t""yes" 1>&6
  2183.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  2184. else
  2185.   echo "$ac_t""no" 1>&6
  2186. fi
  2187.  
  2188.     fi
  2189.  
  2190.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  2191.     # socket/setsockopt and other routines are undefined under SCO ODT
  2192.     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  2193.     # on later versions), says simon@lia.di.epfl.ch: it contains
  2194.     # gethostby* variants that don't use the nameserver (or something).
  2195.     # -lsocket must be given before -lnsl if both are needed.
  2196.     # We assume that if connect needs -lnsl, so does gethostbyname.
  2197.     echo $ac_n "checking for connect""... $ac_c" 1>&6
  2198. echo "configure:2199: checking for connect" >&5
  2199. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  2200.   echo $ac_n "(cached) $ac_c" 1>&6
  2201. else
  2202.   cat > conftest.$ac_ext <<EOF
  2203. #line 2204 "configure"
  2204. #include "confdefs.h"
  2205. /* System header to define __stub macros and hopefully few prototypes,
  2206.     which can conflict with char connect(); below.  */
  2207. #include <assert.h>
  2208. /* Override any gcc2 internal prototype to avoid an error.  */
  2209. /* We use char because int might match the return type of a gcc2
  2210.     builtin and then its argument prototype would still apply.  */
  2211. char connect();
  2212.  
  2213. int main() {
  2214.  
  2215. /* The GNU C library defines this for functions which it implements
  2216.     to always fail with ENOSYS.  Some functions are actually named
  2217.     something starting with __ and the normal name is an alias.  */
  2218. #if defined (__stub_connect) || defined (__stub___connect)
  2219. choke me
  2220. #else
  2221. connect();
  2222. #endif
  2223.  
  2224. ; return 0; }
  2225. EOF
  2226. if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2227.   rm -rf conftest*
  2228.   eval "ac_cv_func_connect=yes"
  2229. else
  2230.   echo "configure: failed program was:" >&5
  2231.   cat conftest.$ac_ext >&5
  2232.   rm -rf conftest*
  2233.   eval "ac_cv_func_connect=no"
  2234. fi
  2235. rm -f conftest*
  2236. fi
  2237.  
  2238. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  2239.   echo "$ac_t""yes" 1>&6
  2240.   :
  2241. else
  2242.   echo "$ac_t""no" 1>&6
  2243. fi
  2244.  
  2245.     if test $ac_cv_func_connect = no; then
  2246.       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  2247. echo "configure:2248: checking for connect in -lsocket" >&5
  2248. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  2249. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2250.   echo $ac_n "(cached) $ac_c" 1>&6
  2251. else
  2252.   ac_save_LIBS="$LIBS"
  2253. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  2254. cat > conftest.$ac_ext <<EOF
  2255. #line 2256 "configure"
  2256. #include "confdefs.h"
  2257. /* Override any gcc2 internal prototype to avoid an error.  */
  2258. /* We use char because int might match the return type of a gcc2
  2259.     builtin and then its argument prototype would still apply.  */
  2260. char connect();
  2261.  
  2262. int main() {
  2263. connect()
  2264. ; return 0; }
  2265. EOF
  2266. if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2267.   rm -rf conftest*
  2268.   eval "ac_cv_lib_$ac_lib_var=yes"
  2269. else
  2270.   echo "configure: failed program was:" >&5
  2271.   cat conftest.$ac_ext >&5
  2272.   rm -rf conftest*
  2273.   eval "ac_cv_lib_$ac_lib_var=no"
  2274. fi
  2275. rm -f conftest*
  2276. LIBS="$ac_save_LIBS"
  2277.  
  2278. fi
  2279. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2280.   echo "$ac_t""yes" 1>&6
  2281.   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  2282. else
  2283.   echo "$ac_t""no" 1>&6
  2284. fi
  2285.  
  2286.     fi
  2287.  
  2288.     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  2289.     echo $ac_n "checking for remove""... $ac_c" 1>&6
  2290. echo "configure:2291: checking for remove" >&5
  2291. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  2292.   echo $ac_n "(cached) $ac_c" 1>&6
  2293. else
  2294.   cat > conftest.$ac_ext <<EOF
  2295. #line 2296 "configure"
  2296. #include "confdefs.h"
  2297. /* System header to define __stub macros and hopefully few prototypes,
  2298.     which can conflict with char remove(); below.  */
  2299. #include <assert.h>
  2300. /* Override any gcc2 internal prototype to avoid an error.  */
  2301. /* We use char because int might match the return type of a gcc2
  2302.     builtin and then its argument prototype would still apply.  */
  2303. char remove();
  2304.  
  2305. int main() {
  2306.  
  2307. /* The GNU C library defines this for functions which it implements
  2308.     to always fail with ENOSYS.  Some functions are actually named
  2309.     something starting with __ and the normal name is an alias.  */
  2310. #if defined (__stub_remove) || defined (__stub___remove)
  2311. choke me
  2312. #else
  2313. remove();
  2314. #endif
  2315.  
  2316. ; return 0; }
  2317. EOF
  2318. if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2319.   rm -rf conftest*
  2320.   eval "ac_cv_func_remove=yes"
  2321. else
  2322.   echo "configure: failed program was:" >&5
  2323.   cat conftest.$ac_ext >&5
  2324.   rm -rf conftest*
  2325.   eval "ac_cv_func_remove=no"
  2326. fi
  2327. rm -f conftest*
  2328. fi
  2329.  
  2330. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  2331.   echo "$ac_t""yes" 1>&6
  2332.   :
  2333. else
  2334.   echo "$ac_t""no" 1>&6
  2335. fi
  2336.  
  2337.     if test $ac_cv_func_remove = no; then
  2338.       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  2339. echo "configure:2340: checking for remove in -lposix" >&5
  2340. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  2341. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2342.   echo $ac_n "(cached) $ac_c" 1>&6
  2343. else
  2344.   ac_save_LIBS="$LIBS"
  2345. LIBS="-lposix  $LIBS"
  2346. cat > conftest.$ac_ext <<EOF
  2347. #line 2348 "configure"
  2348. #include "confdefs.h"
  2349. /* Override any gcc2 internal prototype to avoid an error.  */
  2350. /* We use char because int might match the return type of a gcc2
  2351.     builtin and then its argument prototype would still apply.  */
  2352. char remove();
  2353.  
  2354. int main() {
  2355. remove()
  2356. ; return 0; }
  2357. EOF
  2358. if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2359.   rm -rf conftest*
  2360.   eval "ac_cv_lib_$ac_lib_var=yes"
  2361. else
  2362.   echo "configure: failed program was:" >&5
  2363.   cat conftest.$ac_ext >&5
  2364.   rm -rf conftest*
  2365.   eval "ac_cv_lib_$ac_lib_var=no"
  2366. fi
  2367. rm -f conftest*
  2368. LIBS="$ac_save_LIBS"
  2369.  
  2370. fi
  2371. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2372.   echo "$ac_t""yes" 1>&6
  2373.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  2374. else
  2375.   echo "$ac_t""no" 1>&6
  2376. fi
  2377.  
  2378.     fi
  2379.  
  2380.     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  2381.     echo $ac_n "checking for shmat""... $ac_c" 1>&6
  2382. echo "configure:2383: checking for shmat" >&5
  2383. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  2384.   echo $ac_n "(cached) $ac_c" 1>&6
  2385. else
  2386.   cat > conftest.$ac_ext <<EOF
  2387. #line 2388 "configure"
  2388. #include "confdefs.h"
  2389. /* System header to define __stub macros and hopefully few prototypes,
  2390.     which can conflict with char shmat(); below.  */
  2391. #include <assert.h>
  2392. /* Override any gcc2 internal prototype to avoid an error.  */
  2393. /* We use char because int might match the return type of a gcc2
  2394.     builtin and then its argument prototype would still apply.  */
  2395. char shmat();
  2396.  
  2397. int main() {
  2398.  
  2399. /* The GNU C library defines this for functions which it implements
  2400.     to always fail with ENOSYS.  Some functions are actually named
  2401.     something starting with __ and the normal name is an alias.  */
  2402. #if defined (__stub_shmat) || defined (__stub___shmat)
  2403. choke me
  2404. #else
  2405. shmat();
  2406. #endif
  2407.  
  2408. ; return 0; }
  2409. EOF
  2410. if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2411.   rm -rf conftest*
  2412.   eval "ac_cv_func_shmat=yes"
  2413. else
  2414.   echo "configure: failed program was:" >&5
  2415.   cat conftest.$ac_ext >&5
  2416.   rm -rf conftest*
  2417.   eval "ac_cv_func_shmat=no"
  2418. fi
  2419. rm -f conftest*
  2420. fi
  2421.  
  2422. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  2423.   echo "$ac_t""yes" 1>&6
  2424.   :
  2425. else
  2426.   echo "$ac_t""no" 1>&6
  2427. fi
  2428.  
  2429.     if test $ac_cv_func_shmat = no; then
  2430.       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  2431. echo "configure:2432: checking for shmat in -lipc" >&5
  2432. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  2433. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2434.   echo $ac_n "(cached) $ac_c" 1>&6
  2435. else
  2436.   ac_save_LIBS="$LIBS"
  2437. LIBS="-lipc  $LIBS"
  2438. cat > conftest.$ac_ext <<EOF
  2439. #line 2440 "configure"
  2440. #include "confdefs.h"
  2441. /* Override any gcc2 internal prototype to avoid an error.  */
  2442. /* We use char because int might match the return type of a gcc2
  2443.     builtin and then its argument prototype would still apply.  */
  2444. char shmat();
  2445.  
  2446. int main() {
  2447. shmat()
  2448. ; return 0; }
  2449. EOF
  2450. if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2451.   rm -rf conftest*
  2452.   eval "ac_cv_lib_$ac_lib_var=yes"
  2453. else
  2454.   echo "configure: failed program was:" >&5
  2455.   cat conftest.$ac_ext >&5
  2456.   rm -rf conftest*
  2457.   eval "ac_cv_lib_$ac_lib_var=no"
  2458. fi
  2459. rm -f conftest*
  2460. LIBS="$ac_save_LIBS"
  2461.  
  2462. fi
  2463. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2464.   echo "$ac_t""yes" 1>&6
  2465.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  2466. else
  2467.   echo "$ac_t""no" 1>&6
  2468. fi
  2469.  
  2470.     fi
  2471.   fi
  2472.  
  2473.   # Check for libraries that X11R6 Xt/Xaw programs need.
  2474.   ac_save_LDFLAGS="$LDFLAGS"
  2475.   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  2476.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  2477.   # check for ICE first), but we must link in the order -lSM -lICE or
  2478.   # we get undefined symbols.  So assume we have SM if we have ICE.
  2479.   # These have to be linked with before -lX11, unlike the other
  2480.   # libraries we check for below, so use a different variable.
  2481.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  2482.   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  2483. echo "configure:2484: checking for IceConnectionNumber in -lICE" >&5
  2484. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  2485. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2486.   echo $ac_n "(cached) $ac_c" 1>&6
  2487. else
  2488.   ac_save_LIBS="$LIBS"
  2489. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  2490. cat > conftest.$ac_ext <<EOF
  2491. #line 2492 "configure"
  2492. #include "confdefs.h"
  2493. /* Override any gcc2 internal prototype to avoid an error.  */
  2494. /* We use char because int might match the return type of a gcc2
  2495.     builtin and then its argument prototype would still apply.  */
  2496. char IceConnectionNumber();
  2497.  
  2498. int main() {
  2499. IceConnectionNumber()
  2500. ; return 0; }
  2501. EOF
  2502. if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2503.   rm -rf conftest*
  2504.   eval "ac_cv_lib_$ac_lib_var=yes"
  2505. else
  2506.   echo "configure: failed program was:" >&5
  2507.   cat conftest.$ac_ext >&5
  2508.   rm -rf conftest*
  2509.   eval "ac_cv_lib_$ac_lib_var=no"
  2510. fi
  2511. rm -f conftest*
  2512. LIBS="$ac_save_LIBS"
  2513.  
  2514. fi
  2515. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2516.   echo "$ac_t""yes" 1>&6
  2517.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  2518. else
  2519.   echo "$ac_t""no" 1>&6
  2520. fi
  2521.  
  2522.   LDFLAGS="$ac_save_LDFLAGS"
  2523.  
  2524. fi
  2525.  
  2526. echo "Ignoring libraries \"$X_PRE_LIBS\" requested by configure."
  2527. LIBS="$LIBS$X_LIBS"
  2528. CFLAGS="$CFLAGS $X_CFLAGS"
  2529. CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  2530.  
  2531. GLLIB=
  2532. echo $ac_n "checking for glXMakeCurrent in -lGL""... $ac_c" 1>&6
  2533. echo "configure:2534: checking for glXMakeCurrent in -lGL" >&5
  2534. ac_lib_var=`echo GL'_'glXMakeCurrent | sed 'y%./+-%__p_%'`
  2535. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2536.   echo $ac_n "(cached) $ac_c" 1>&6
  2537. else
  2538.   ac_save_LIBS="$LIBS"
  2539. LIBS="-lGL \
  2540.     -lX11 -lXext $X_EXTRA_LIBS -lm $LIBS"
  2541. cat > conftest.$ac_ext <<EOF
  2542. #line 2543 "configure"
  2543. #include "confdefs.h"
  2544. /* Override any gcc2 internal prototype to avoid an error.  */
  2545. /* We use char because int might match the return type of a gcc2
  2546.     builtin and then its argument prototype would still apply.  */
  2547. char glXMakeCurrent();
  2548.  
  2549. int main() {
  2550. glXMakeCurrent()
  2551. ; return 0; }
  2552. EOF
  2553. if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2554.   rm -rf conftest*
  2555.   eval "ac_cv_lib_$ac_lib_var=yes"
  2556. else
  2557.   echo "configure: failed program was:" >&5
  2558.   cat conftest.$ac_ext >&5
  2559.   rm -rf conftest*
  2560.   eval "ac_cv_lib_$ac_lib_var=no"
  2561. fi
  2562. rm -f conftest*
  2563. LIBS="$ac_save_LIBS"
  2564.  
  2565. fi
  2566. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2567.   echo "$ac_t""yes" 1>&6
  2568.   cat >> confdefs.h <<\EOF
  2569. #define HAVE_GL 1
  2570. EOF
  2571.  GLLIB=" -lGLU -lGL"
  2572. else
  2573.   echo "$ac_t""no" 1>&6
  2574. \
  2575.     echo $ac_n "checking for glXMakeCurrent in -lMesaGL""... $ac_c" 1>&6
  2576. echo "configure:2577: checking for glXMakeCurrent in -lMesaGL" >&5
  2577. ac_lib_var=`echo MesaGL'_'glXMakeCurrent | sed 'y%./+-%__p_%'`
  2578. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2579.   echo $ac_n "(cached) $ac_c" 1>&6
  2580. else
  2581.   ac_save_LIBS="$LIBS"
  2582. LIBS="-lMesaGL \
  2583.     -lX11 -lXext $X_EXTRA_LIBS -lm $LIBS"
  2584. cat > conftest.$ac_ext <<EOF
  2585. #line 2586 "configure"
  2586. #include "confdefs.h"
  2587. /* Override any gcc2 internal prototype to avoid an error.  */
  2588. /* We use char because int might match the return type of a gcc2
  2589.     builtin and then its argument prototype would still apply.  */
  2590. char glXMakeCurrent();
  2591.  
  2592. int main() {
  2593. glXMakeCurrent()
  2594. ; return 0; }
  2595. EOF
  2596. if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2597.   rm -rf conftest*
  2598.   eval "ac_cv_lib_$ac_lib_var=yes"
  2599. else
  2600.   echo "configure: failed program was:" >&5
  2601.   cat conftest.$ac_ext >&5
  2602.   rm -rf conftest*
  2603.   eval "ac_cv_lib_$ac_lib_var=no"
  2604. fi
  2605. rm -f conftest*
  2606. LIBS="$ac_save_LIBS"
  2607.  
  2608. fi
  2609. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2610.   echo "$ac_t""yes" 1>&6
  2611.   cat >> confdefs.h <<\EOF
  2612. #define HAVE_GL 1
  2613. EOF
  2614.  GLLIB=" -lMesaGLU -lMesaGL"
  2615. else
  2616.   echo "$ac_t""no" 1>&6
  2617. fi
  2618.  
  2619. fi
  2620.  
  2621.  
  2622.  
  2623. ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
  2624. echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
  2625. echo "configure:2626: checking for X11/extensions/Xdbe.h" >&5
  2626. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2627.   echo $ac_n "(cached) $ac_c" 1>&6
  2628. else
  2629.   cat > conftest.$ac_ext <<EOF
  2630. #line 2631 "configure"
  2631. #include "confdefs.h"
  2632. #include <X11/extensions/Xdbe.h>
  2633. EOF
  2634. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2635. { (eval echo configure:2636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2636. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2637. if test -z "$ac_err"; then
  2638.   rm -rf conftest*
  2639.   eval "ac_cv_header_$ac_safe=yes"
  2640. else
  2641.   echo "$ac_err" >&5
  2642.   echo "configure: failed program was:" >&5
  2643.   cat conftest.$ac_ext >&5
  2644.   rm -rf conftest*
  2645.   eval "ac_cv_header_$ac_safe=no"
  2646. fi
  2647. rm -f conftest*
  2648. fi
  2649. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2650.   echo "$ac_t""yes" 1>&6
  2651.   \
  2652.     if test "$uname" != "SunOS"; then
  2653.         cat >> confdefs.h <<\EOF
  2654. #define HAVE_XDBE 1
  2655. EOF
  2656.  
  2657.     fi
  2658. else
  2659.   echo "$ac_t""no" 1>&6
  2660. fi
  2661.  
  2662.  
  2663. echo $ac_n "checking "for X overlay visuals"""... $ac_c" 1>&6
  2664. echo "configure:2665: checking "for X overlay visuals"" >&5
  2665. if eval "test \"`echo '$''{'ac_cv_have_overlay'+set}'`\" = set"; then
  2666.   echo $ac_n "(cached) $ac_c" 1>&6
  2667. else
  2668.   if xprop -root 2>/dev/null | grep -c "SERVER_OVERLAY_VISUALS" >/dev/null; then
  2669.         ac_cv_have_overlay=yes
  2670.     else
  2671.         ac_cv_have_overlay=no
  2672.     fi
  2673. fi
  2674.  
  2675. echo "$ac_t""$ac_cv_have_overlay" 1>&6
  2676. if test "$ac_cv_have_overlay" = yes; then
  2677.     cat >> confdefs.h <<\EOF
  2678. #define HAVE_OVERLAY 1
  2679. EOF
  2680.  
  2681. fi
  2682.  
  2683. MAKEDEPEND="\$(CXX) -M"
  2684.  
  2685. if test -n "$GXX"; then
  2686.     CFLAGS="-Wall $CFLAGS"
  2687.     CXXFLAGS="-Wall -Wno-return-type $CXXFLAGS"
  2688.     if test -z "$DEBUGFLAG"; then
  2689.         CFLAGS="-O2 $CFLAGS"
  2690.         CXXFLAGS="-O2 $CXXFLAGS"
  2691.     fi
  2692.     if test $PICFLAG = 1; then
  2693.         CFLAGS="-fPIC $CFLAGS"
  2694.         CXXFLAGS="-fPIC $CXXFLAGS"
  2695.     fi
  2696. else
  2697.     case `(uname) 2>/dev/null` in
  2698.         IRIX*)
  2699.         # Running some flavor of IRIX; see which version and
  2700.         # set things up according...
  2701.         if test "$uversion" -ge 62; then
  2702.             # We are running IRIX 6.2 or higher; uncomment the following
  2703.         # lines if you don't have IDO 7.2 or higher:
  2704.         #
  2705.         #     CXX="CC -n32"
  2706.         #     CC="cc -n32"
  2707.         #     LD="ld -n32"
  2708.         #     MAKEDEPEND="CC -M"
  2709.  
  2710.         echo "FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI -n32"
  2711.             # -woff 3322 is necessary due to errors in Xlib headers on IRIX
  2712.             CFLAGS="-fullwarn $CFLAGS"
  2713.             CXXFLAGS="-fullwarn -woff 1685,3322 $CXXFLAGS"
  2714.         else
  2715.             CXXFLAGS="+w +pp $CXXFLAGS"
  2716.         fi
  2717.         if test -z "$DEBUGFLAG"; then
  2718.             CFLAGS="-O2 $CFLAGS"
  2719.             CXXFLAGS="-O2 $CXXFLAGS"
  2720.         fi
  2721.         ;;
  2722.     HP-UX*)
  2723.         # Running HP-UX; these options should work for the HP compilers.
  2724.         if test -z "$DEBUGFLAG"; then
  2725.         CFLAGS="+O2 $CFLAGS"
  2726.         CXXFLAGS="+O2 +W336,501,736,740,749,829 $CXXFLAGS"
  2727.         fi
  2728.         ;;
  2729.     SunOS*)
  2730.         # Solaris
  2731.         if test -z "$DEBUGFLAG"; then
  2732.         CFLAGS="-O"
  2733.         CXXFLAGS="-O"
  2734.         fi
  2735.         if test $PICFLAG = 1; then
  2736.         CFLAGS="-KPIC $CFLAGS"
  2737.         CXXFLAGS="-PIC $CXXFLAGS"
  2738.         fi
  2739.         ;;
  2740.     *)
  2741.         # Running some other operating system; inform the user they
  2742.         # should contribute the necessary options to fltk-bugs@easysw.com...
  2743.         echo "Building FLTK with default compiler optimizations; contact"
  2744.         echo "fltk-bugs@easysw.com with uname and compiler options needed"
  2745.         echo "for your platform, or set the CFLAGS and CXXFLAGS options"
  2746.         echo "before running configure."
  2747.         ;;
  2748.     esac
  2749. fi
  2750.  
  2751. CFLAGS="$DEBUGFLAG $CFLAGS"
  2752. CXXFLAGS="$DEBUGFLAG $CXXFLAGS"
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760. trap '' 1 2 15
  2761. cat > confcache <<\EOF
  2762. # This file is a shell script that caches the results of configure
  2763. # tests run on this system so they can be shared between configure
  2764. # scripts and configure runs.  It is not useful on other systems.
  2765. # If it contains results you don't want to keep, you may remove or edit it.
  2766. #
  2767. # By default, configure uses ./config.cache as the cache file,
  2768. # creating it if it does not exist already.  You can give configure
  2769. # the --cache-file=FILE option to use a different cache file; that is
  2770. # what configure does when it calls configure scripts in
  2771. # subdirectories, so they share the cache.
  2772. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2773. # config.status only pays attention to the cache file if you give it the
  2774. # --recheck option to rerun configure.
  2775. #
  2776. EOF
  2777. # The following way of writing the cache mishandles newlines in values,
  2778. # but we know of no workaround that is simple, portable, and efficient.
  2779. # So, don't put newlines in cache variables' values.
  2780. # Ultrix sh set writes to stderr and can't be redirected directly,
  2781. # and sets the high bit in the cache file unless we assign to the vars.
  2782. (set) 2>&1 |
  2783.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2784.   *ac_space=\ *)
  2785.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2786.     # turns \\\\ into \\, and sed turns \\ into \).
  2787.     sed -n \
  2788.       -e "s/'/'\\\\''/g" \
  2789.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2790.     ;;
  2791.   *)
  2792.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  2793.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2794.     ;;
  2795.   esac >> confcache
  2796. if cmp -s $cache_file confcache; then
  2797.   :
  2798. else
  2799.   if test -w $cache_file; then
  2800.     echo "updating cache $cache_file"
  2801.     cat confcache > $cache_file
  2802.   else
  2803.     echo "not updating unwritable cache $cache_file"
  2804.   fi
  2805. fi
  2806. rm -f confcache
  2807.  
  2808. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2809.  
  2810. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2811. # Let make expand exec_prefix.
  2812. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2813.  
  2814. # Any assignment to VPATH causes Sun make to only execute
  2815. # the first set of double-colon rules, so remove it if not needed.
  2816. # If there is a colon in the path, we need to keep it.
  2817. if test "x$srcdir" = x.; then
  2818.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2819. fi
  2820.  
  2821. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2822.  
  2823. DEFS=-DHAVE_CONFIG_H
  2824.  
  2825. # Without the "./", some shells look in PATH for config.status.
  2826. : ${CONFIG_STATUS=./config.status}
  2827.  
  2828. echo creating $CONFIG_STATUS
  2829. rm -f $CONFIG_STATUS
  2830. cat > $CONFIG_STATUS <<EOF
  2831. #! /bin/sh
  2832. # Generated automatically by configure.
  2833. # Run this file to recreate the current configuration.
  2834. # This directory was configured as follows,
  2835. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2836. #
  2837. # $0 $ac_configure_args
  2838. #
  2839. # Compiler output produced by configure, useful for debugging
  2840. # configure, is in ./config.log if it exists.
  2841.  
  2842. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2843. for ac_option
  2844. do
  2845.   case "\$ac_option" in
  2846.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2847.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2848.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2849.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2850.     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  2851.     exit 0 ;;
  2852.   -help | --help | --hel | --he | --h)
  2853.     echo "\$ac_cs_usage"; exit 0 ;;
  2854.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2855.   esac
  2856. done
  2857.  
  2858. ac_given_srcdir=$srcdir
  2859.  
  2860. trap 'rm -fr `echo "makeinclude config.h:configh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2861. EOF
  2862. cat >> $CONFIG_STATUS <<EOF
  2863.  
  2864. # Protect against being on the right side of a sed subst in config.status.
  2865. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2866.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2867. $ac_vpsub
  2868. $extrasub
  2869. s%@SHELL@%$SHELL%g
  2870. s%@CFLAGS@%$CFLAGS%g
  2871. s%@CPPFLAGS@%$CPPFLAGS%g
  2872. s%@CXXFLAGS@%$CXXFLAGS%g
  2873. s%@FFLAGS@%$FFLAGS%g
  2874. s%@DEFS@%$DEFS%g
  2875. s%@LDFLAGS@%$LDFLAGS%g
  2876. s%@LIBS@%$LIBS%g
  2877. s%@exec_prefix@%$exec_prefix%g
  2878. s%@prefix@%$prefix%g
  2879. s%@program_transform_name@%$program_transform_name%g
  2880. s%@bindir@%$bindir%g
  2881. s%@sbindir@%$sbindir%g
  2882. s%@libexecdir@%$libexecdir%g
  2883. s%@datadir@%$datadir%g
  2884. s%@sysconfdir@%$sysconfdir%g
  2885. s%@sharedstatedir@%$sharedstatedir%g
  2886. s%@localstatedir@%$localstatedir%g
  2887. s%@libdir@%$libdir%g
  2888. s%@includedir@%$includedir%g
  2889. s%@oldincludedir@%$oldincludedir%g
  2890. s%@infodir@%$infodir%g
  2891. s%@mandir@%$mandir%g
  2892. s%@RANLIB@%$RANLIB%g
  2893. s%@CC@%$CC%g
  2894. s%@CXX@%$CXX%g
  2895. s%@CPP@%$CPP%g
  2896. s%@X_CFLAGS@%$X_CFLAGS%g
  2897. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  2898. s%@X_LIBS@%$X_LIBS%g
  2899. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  2900. s%@GLLIB@%$GLLIB%g
  2901. s%@DSONAME@%$DSONAME%g
  2902. s%@DSOCOMMAND@%$DSOCOMMAND%g
  2903. s%@LIBNAME@%$LIBNAME%g
  2904. s%@LIBCOMMAND@%$LIBCOMMAND%g
  2905. s%@MAKEDEPEND@%$MAKEDEPEND%g
  2906.  
  2907. CEOF
  2908. EOF
  2909.  
  2910. cat >> $CONFIG_STATUS <<\EOF
  2911.  
  2912. # Split the substitutions into bite-sized pieces for seds with
  2913. # small command number limits, like on Digital OSF/1 and HP-UX.
  2914. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2915. ac_file=1 # Number of current file.
  2916. ac_beg=1 # First line for current file.
  2917. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2918. ac_more_lines=:
  2919. ac_sed_cmds=""
  2920. while $ac_more_lines; do
  2921.   if test $ac_beg -gt 1; then
  2922.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2923.   else
  2924.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2925.   fi
  2926.   if test ! -s conftest.s$ac_file; then
  2927.     ac_more_lines=false
  2928.     rm -f conftest.s$ac_file
  2929.   else
  2930.     if test -z "$ac_sed_cmds"; then
  2931.       ac_sed_cmds="sed -f conftest.s$ac_file"
  2932.     else
  2933.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2934.     fi
  2935.     ac_file=`expr $ac_file + 1`
  2936.     ac_beg=$ac_end
  2937.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2938.   fi
  2939. done
  2940. if test -z "$ac_sed_cmds"; then
  2941.   ac_sed_cmds=cat
  2942. fi
  2943. EOF
  2944.  
  2945. cat >> $CONFIG_STATUS <<EOF
  2946.  
  2947. CONFIG_FILES=\${CONFIG_FILES-"makeinclude"}
  2948. EOF
  2949. cat >> $CONFIG_STATUS <<\EOF
  2950. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2951.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2952.   case "$ac_file" in
  2953.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2954.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2955.   *) ac_file_in="${ac_file}.in" ;;
  2956.   esac
  2957.  
  2958.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2959.  
  2960.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2961.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2962.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2963.     # The file is in a subdirectory.
  2964.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2965.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2966.     # A "../" for each directory in $ac_dir_suffix.
  2967.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2968.   else
  2969.     ac_dir_suffix= ac_dots=
  2970.   fi
  2971.  
  2972.   case "$ac_given_srcdir" in
  2973.   .)  srcdir=.
  2974.       if test -z "$ac_dots"; then top_srcdir=.
  2975.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2976.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2977.   *) # Relative path.
  2978.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2979.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2980.   esac
  2981.  
  2982.  
  2983.   echo creating "$ac_file"
  2984.   rm -f "$ac_file"
  2985.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2986.   case "$ac_file" in
  2987.   *Makefile*) ac_comsub="1i\\
  2988. # $configure_input" ;;
  2989.   *) ac_comsub= ;;
  2990.   esac
  2991.  
  2992.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2993.   sed -e "$ac_comsub
  2994. s%@configure_input@%$configure_input%g
  2995. s%@srcdir@%$srcdir%g
  2996. s%@top_srcdir@%$top_srcdir%g
  2997. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  2998. fi; done
  2999. rm -f conftest.s*
  3000.  
  3001. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3002. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3003. #
  3004. # ac_d sets the value in "#define NAME VALUE" lines.
  3005. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3006. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3007. ac_dC='\3'
  3008. ac_dD='%g'
  3009. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3010. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3011. ac_uB='\([     ]\)%\1#\2define\3'
  3012. ac_uC=' '
  3013. ac_uD='\4%g'
  3014. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3015. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3016. ac_eB='$%\1#\2define\3'
  3017. ac_eC=' '
  3018. ac_eD='%g'
  3019.  
  3020. if test "${CONFIG_HEADERS+set}" != set; then
  3021. EOF
  3022. cat >> $CONFIG_STATUS <<EOF
  3023.   CONFIG_HEADERS="config.h:configh.in"
  3024. EOF
  3025. cat >> $CONFIG_STATUS <<\EOF
  3026. fi
  3027. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3028.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3029.   case "$ac_file" in
  3030.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3031.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3032.   *) ac_file_in="${ac_file}.in" ;;
  3033.   esac
  3034.  
  3035.   echo creating $ac_file
  3036.  
  3037.   rm -f conftest.frag conftest.in conftest.out
  3038.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3039.   cat $ac_file_inputs > conftest.in
  3040.  
  3041. EOF
  3042.  
  3043. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3044. # the proper values into config.h.in to produce config.h.  And first:
  3045. # Protect against being on the right side of a sed subst in config.status.
  3046. # Protect against being in an unquoted here document in config.status.
  3047. rm -f conftest.vals
  3048. cat > conftest.hdr <<\EOF
  3049. s/[\\&%]/\\&/g
  3050. s%[\\$`]%\\&%g
  3051. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3052. s%ac_d%ac_u%gp
  3053. s%ac_u%ac_e%gp
  3054. EOF
  3055. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3056. rm -f conftest.hdr
  3057.  
  3058. # This sed command replaces #undef with comments.  This is necessary, for
  3059. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3060. # on some systems where configure will not decide to define it.
  3061. cat >> conftest.vals <<\EOF
  3062. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3063. EOF
  3064.  
  3065. # Break up conftest.vals because some shells have a limit on
  3066. # the size of here documents, and old seds have small limits too.
  3067.  
  3068. rm -f conftest.tail
  3069. while :
  3070. do
  3071.   ac_lines=`grep -c . conftest.vals`
  3072.   # grep -c gives empty output for an empty file on some AIX systems.
  3073.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3074.   # Write a limited-size here document to conftest.frag.
  3075.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3076.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3077.   echo 'CEOF
  3078.   sed -f conftest.frag conftest.in > conftest.out
  3079.   rm -f conftest.in
  3080.   mv conftest.out conftest.in
  3081. ' >> $CONFIG_STATUS
  3082.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3083.   rm -f conftest.vals
  3084.   mv conftest.tail conftest.vals
  3085. done
  3086. rm -f conftest.vals
  3087.  
  3088. cat >> $CONFIG_STATUS <<\EOF
  3089.   rm -f conftest.frag conftest.h
  3090.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3091.   cat conftest.in >> conftest.h
  3092.   rm -f conftest.in
  3093.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3094.     echo "$ac_file is unchanged"
  3095.     rm -f conftest.h
  3096.   else
  3097.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3098.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3099.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3100.       # The file is in a subdirectory.
  3101.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3102.     fi
  3103.     rm -f $ac_file
  3104.     mv conftest.h $ac_file
  3105.   fi
  3106. fi; done
  3107.  
  3108. EOF
  3109. cat >> $CONFIG_STATUS <<EOF
  3110.  
  3111. EOF
  3112. cat >> $CONFIG_STATUS <<\EOF
  3113.  
  3114. exit 0
  3115. EOF
  3116. chmod +x $CONFIG_STATUS
  3117. rm -fr confdefs* $ac_clean_files
  3118. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3119.  
  3120.  
  3121.